@triflux/core 10.1.0 → 10.26.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 (145) hide show
  1. package/hooks/agent-route-guard.mjs +14 -10
  2. package/hooks/cross-review-tracker.mjs +21 -8
  3. package/hooks/error-context.mjs +20 -8
  4. package/hooks/hook-adaptive-collector.mjs +18 -16
  5. package/hooks/hook-manager.mjs +93 -32
  6. package/hooks/hook-orchestrator.mjs +267 -35
  7. package/hooks/hook-registry.json +343 -256
  8. package/hooks/hooks.json +49 -1
  9. package/hooks/keyword-rules.json +191 -31
  10. package/hooks/lib/resolve-root.mjs +1 -1
  11. package/hooks/mcp-config-watcher.mjs +6 -2
  12. package/hooks/permission-safe-allow.mjs +233 -0
  13. package/hooks/pipeline-stop.mjs +369 -22
  14. package/hooks/post-tool-tips.mjs +306 -0
  15. package/hooks/pre-compact-snapshot.mjs +181 -0
  16. package/hooks/safety-guard.mjs +262 -34
  17. package/hooks/session-end-cleanup.mjs +345 -0
  18. package/hooks/session-start-fast.mjs +214 -0
  19. package/hooks/subagent-tracker.mjs +267 -0
  20. package/hooks/subagent-verifier.mjs +9 -4
  21. package/hub/account-broker.mjs +1036 -66
  22. package/hub/adaptive-diagnostic.mjs +75 -48
  23. package/hub/adaptive-inject.mjs +96 -58
  24. package/hub/adaptive-memory.mjs +156 -42
  25. package/hub/adaptive.mjs +60 -31
  26. package/hub/assign-callbacks.mjs +163 -126
  27. package/hub/bridge.mjs +1051 -290
  28. package/hub/cli-adapter-base.mjs +321 -97
  29. package/hub/codex-adapter.mjs +179 -93
  30. package/hub/codex-compat.mjs +4 -4
  31. package/hub/codex-preflight.mjs +113 -37
  32. package/hub/delegator/contracts.mjs +22 -21
  33. package/hub/delegator/index.mjs +14 -14
  34. package/hub/delegator/schema/delegator-tools.schema.json +1 -1
  35. package/hub/delegator/service.mjs +93 -64
  36. package/hub/delegator/tool-definitions.mjs +35 -35
  37. package/hub/dynamic-routing-engine.mjs +511 -0
  38. package/hub/fullcycle.mjs +34 -18
  39. package/hub/gemini-adapter.mjs +82 -108
  40. package/hub/hitl.mjs +202 -143
  41. package/hub/intent.mjs +167 -38
  42. package/hub/lib/bash-path.mjs +73 -0
  43. package/hub/lib/cache-guard.mjs +43 -17
  44. package/hub/lib/env-detect.mjs +145 -0
  45. package/hub/lib/hosts-compat.mjs +319 -0
  46. package/hub/lib/mcp-response-cache.mjs +239 -0
  47. package/hub/lib/memory-store.mjs +285 -111
  48. package/hub/lib/path-utils.mjs +165 -0
  49. package/hub/lib/phase-manager.mjs +493 -0
  50. package/hub/lib/process-utils.mjs +797 -104
  51. package/hub/lib/prompt-tmp.mjs +33 -0
  52. package/hub/lib/risk-tier.mjs +53 -0
  53. package/hub/lib/spawn-trace.mjs +561 -0
  54. package/hub/lib/ssh-command.mjs +44 -24
  55. package/hub/lib/ssh-retry.mjs +5 -1
  56. package/hub/lib/staged-file-detect.mjs +43 -0
  57. package/hub/lib/state-snapshot.mjs +293 -0
  58. package/hub/lib/tfx-route-args.mjs +309 -0
  59. package/hub/lib/timeline-adapter.mjs +190 -0
  60. package/hub/lib/trace-recorder.mjs +153 -0
  61. package/hub/lib/uuidv7.mjs +4 -3
  62. package/hub/memory-doctor.mjs +266 -106
  63. package/hub/middleware/quota-middleware.mjs +70 -0
  64. package/hub/middleware/request-logger.mjs +61 -34
  65. package/hub/paths.mjs +9 -9
  66. package/hub/pipeline/gates/confidence.mjs +34 -15
  67. package/hub/pipeline/gates/consensus.mjs +27 -15
  68. package/hub/pipeline/gates/index.mjs +7 -3
  69. package/hub/pipeline/gates/selfcheck.mjs +57 -19
  70. package/hub/pipeline/index.mjs +77 -42
  71. package/hub/pipeline/state.mjs +10 -10
  72. package/hub/pipeline/transitions.mjs +40 -23
  73. package/hub/platform.mjs +65 -48
  74. package/hub/quality/deslop.mjs +70 -49
  75. package/hub/reflexion.mjs +87 -13
  76. package/hub/research.mjs +33 -25
  77. package/hub/router.mjs +941 -791
  78. package/hub/routing/complexity.mjs +132 -29
  79. package/hub/routing/index.mjs +17 -12
  80. package/hub/routing/q-learning.mjs +78 -30
  81. package/hub/routing-snapshot.mjs +261 -0
  82. package/hub/session-fingerprint.mjs +127 -61
  83. package/hub/state.mjs +86 -44
  84. package/hub/team/claude-daemon-control.mjs +1130 -0
  85. package/hub/team/retry-state-machine.mjs +336 -0
  86. package/hub/token-mode.mjs +72 -71
  87. package/hub/workers/worker-utils.mjs +23 -17
  88. package/hud/colors.mjs +27 -9
  89. package/hud/constants.mjs +190 -27
  90. package/hud/context-monitor.mjs +133 -44
  91. package/hud/hud-qos-status.mjs +157 -50
  92. package/hud/mission-board.mjs +56 -0
  93. package/hud/providers/claude.mjs +398 -114
  94. package/hud/providers/codex.mjs +96 -21
  95. package/hud/providers/gemini.mjs +210 -52
  96. package/hud/renderers.mjs +440 -127
  97. package/hud/terminal.mjs +101 -31
  98. package/hud/utils.mjs +81 -39
  99. package/mesh/index.mjs +69 -0
  100. package/mesh/mesh-budget.mjs +137 -0
  101. package/mesh/mesh-heartbeat.mjs +100 -0
  102. package/mesh/mesh-protocol.mjs +96 -0
  103. package/mesh/mesh-queue.mjs +163 -0
  104. package/mesh/mesh-registry.mjs +78 -0
  105. package/mesh/mesh-router.mjs +77 -0
  106. package/package.json +5 -1
  107. package/scripts/lib/agent-json.mjs +27 -0
  108. package/scripts/lib/async.mjs +174 -0
  109. package/scripts/lib/claudemd-scanner.mjs +6 -1
  110. package/scripts/lib/cli-agy.mjs +62 -0
  111. package/scripts/lib/cli-claude.mjs +78 -0
  112. package/scripts/lib/cli-codex.mjs +199 -0
  113. package/scripts/lib/cli-gemini.mjs +37 -0
  114. package/scripts/lib/codex-recovery.sh +50 -0
  115. package/scripts/lib/context.mjs +3 -3
  116. package/scripts/lib/cross-review-utils.mjs +13 -5
  117. package/scripts/lib/doctor-env-checks.mjs +121 -0
  118. package/scripts/lib/dynamic-route-cli.mjs +107 -0
  119. package/scripts/lib/env-probe.mjs +58 -30
  120. package/scripts/lib/env.mjs +14 -0
  121. package/scripts/lib/gemini-profiles.mjs +44 -10
  122. package/scripts/lib/handoff.mjs +33 -17
  123. package/scripts/lib/hook-utils.mjs +8 -6
  124. package/scripts/lib/hub.mjs +48 -0
  125. package/scripts/lib/keyword-rules.mjs +49 -20
  126. package/scripts/lib/logger.mjs +24 -24
  127. package/scripts/lib/mcp-filter.mjs +391 -247
  128. package/scripts/lib/mcp-gateway-health-check.mjs +159 -0
  129. package/scripts/lib/mcp-gateway-servers.mjs +70 -0
  130. package/scripts/lib/mcp-gateway-wrapper-check.mjs +35 -0
  131. package/scripts/lib/mcp-guard-engine.mjs +1281 -115
  132. package/scripts/lib/mcp-health.mjs +773 -0
  133. package/scripts/lib/mcp-manifest.mjs +24 -14
  134. package/scripts/lib/mcp-server-catalog.mjs +355 -118
  135. package/scripts/lib/pid.mjs +63 -0
  136. package/scripts/lib/process-utils.mjs +26 -0
  137. package/scripts/lib/psmux-info.mjs +117 -12
  138. package/scripts/lib/quota.mjs +47 -0
  139. package/scripts/lib/remote-spawn-transfer.mjs +44 -14
  140. package/scripts/lib/skill-state.mjs +220 -0
  141. package/scripts/lib/skill-template.mjs +32 -7
  142. package/scripts/lib/team.mjs +75 -0
  143. package/scripts/lib/timeout.mjs +66 -0
  144. package/scripts/lib/tmp.mjs +26 -0
  145. package/scripts/lib/toml.mjs +113 -0
@@ -1,256 +1,343 @@
1
- {
2
- "$schema": "hook-registry-schema",
3
- "version": 1,
4
- "description": "훅 우선순위 레지스트리 — 오케스트레이터가 이 파일을 읽어 순차 실행한다. priority 낮을수록 먼저 실행.",
5
- "defaults": {
6
- "triflux_priority": 0,
7
- "omc_priority": 50,
8
- "external_priority": 100
9
- },
10
- "events": {
11
- "PreToolUse": [
12
- {
13
- "id": "tfx-safety-guard",
14
- "source": "triflux",
15
- "matcher": "Bash",
16
- "command": "node \"${PLUGIN_ROOT}/hooks/safety-guard.mjs\"",
17
- "priority": 0,
18
- "enabled": true,
19
- "timeout": 3,
20
- "blocking": true,
21
- "description": "위험 Bash 명령 사전 차단 (rm -rf, force push 등)"
22
- },
23
- {
24
- "id": "tfx-agent-route-guard",
25
- "source": "triflux",
26
- "matcher": "Agent",
27
- "command": "node \"${PLUGIN_ROOT}/hooks/agent-route-guard.mjs\"",
28
- "priority": 0,
29
- "enabled": true,
30
- "timeout": 3,
31
- "blocking": false,
32
- "description": "서브에이전트 스폰 시 triflux 컨텍스트 주입"
33
- },
34
- {
35
- "id": "tfx-cross-review-gate",
36
- "source": "triflux",
37
- "matcher": "Bash",
38
- "command": "node \"${PLUGIN_ROOT}/scripts/cross-review-gate.mjs\"",
39
- "priority": 1,
40
- "enabled": true,
41
- "timeout": 3,
42
- "blocking": true,
43
- "description": "git commit 전 교차 리뷰 미검증 파일 차단/경고"
44
- },
45
- {
46
- "id": "omc-headless-guard",
47
- "source": "omc",
48
- "matcher": "Bash|Agent",
49
- "command": "bash \"${HOME}/.claude/scripts/headless-guard-fast.sh\"",
50
- "priority": 50,
51
- "enabled": true,
52
- "timeout": 3,
53
- "blocking": false,
54
- "description": "psmux headless 가드"
55
- },
56
- {
57
- "id": "omc-tfx-gate-activate",
58
- "source": "omc",
59
- "matcher": "Skill",
60
- "command": "node \"${HOME}/.claude/scripts/tfx-gate-activate.mjs\"",
61
- "priority": 50,
62
- "enabled": true,
63
- "timeout": 2,
64
- "blocking": false,
65
- "description": "tfx-multi 상태 추적 게이트"
66
- },
67
- {
68
- "id": "tfx-write-edit-passthrough",
69
- "source": "triflux",
70
- "matcher": "Edit|Write",
71
- "command": "exit 0",
72
- "priority": 999,
73
- "enabled": true,
74
- "blocking": false,
75
- "description": "Edit/Write passthrough"
76
- }
77
- ],
78
- "PostToolUse": [
79
- {
80
- "id": "tfx-cross-review-tracker",
81
- "source": "triflux",
82
- "matcher": "Edit|Write",
83
- "command": "node \"${PLUGIN_ROOT}/hooks/cross-review-tracker.mjs\"",
84
- "priority": 0,
85
- "enabled": true,
86
- "timeout": 3,
87
- "blocking": false,
88
- "description": "파일 수정 추적 → 교차 리뷰 nudge"
89
- },
90
- {
91
- "id": "tfx-mcp-config-watcher",
92
- "source": "triflux",
93
- "matcher": "Edit|Write",
94
- "command": "node \"${PLUGIN_ROOT}/hooks/mcp-config-watcher.mjs\"",
95
- "priority": 1,
96
- "enabled": true,
97
- "timeout": 3,
98
- "blocking": false,
99
- "description": "감시 대상 MCP 설정 변경 감지 → stdio MCP 자동 치환"
100
- }
101
- ],
102
- "PostToolUseFailure": [
103
- {
104
- "id": "tfx-error-context",
105
- "source": "triflux",
106
- "matcher": "*",
107
- "command": "node \"${PLUGIN_ROOT}/hooks/error-context.mjs\"",
108
- "priority": 0,
109
- "enabled": true,
110
- "timeout": 3,
111
- "blocking": false,
112
- "description": "도구 실패 시 에러 힌트 자동 주입"
113
- },
114
- {
115
- "id": "tfx-adaptive-collector",
116
- "source": "triflux",
117
- "matcher": "*",
118
- "command": "node \"${PLUGIN_ROOT}/hooks/hook-adaptive-collector.mjs\"",
119
- "priority": 1,
120
- "enabled": true,
121
- "timeout": 3,
122
- "blocking": false,
123
- "description": "에러 패턴 수집 → Neural Memory adaptive engine 학습"
124
- }
125
- ],
126
- "UserPromptSubmit": [
127
- {
128
- "id": "tfx-keyword-detector",
129
- "source": "triflux",
130
- "matcher": "*",
131
- "command": "node \"${PLUGIN_ROOT}/scripts/run.cjs\" \"${PLUGIN_ROOT}/scripts/keyword-detector.mjs\"",
132
- "priority": 0,
133
- "enabled": true,
134
- "timeout": 5,
135
- "blocking": false,
136
- "description": "키워드 매칭 → 스킬 자동 라우팅"
137
- }
138
- ],
139
- "SessionStart": [
140
- {
141
- "id": "tfx-setup",
142
- "source": "triflux",
143
- "matcher": "*",
144
- "command": "node \"${PLUGIN_ROOT}/scripts/setup.mjs\"",
145
- "priority": 0,
146
- "enabled": true,
147
- "timeout": 10,
148
- "blocking": false,
149
- "description": "triflux 환경 초기화"
150
- },
151
- {
152
- "id": "tfx-mcp-safety-guard",
153
- "source": "triflux",
154
- "matcher": "*",
155
- "command": "node \"${PLUGIN_ROOT}/scripts/mcp-safety-guard.mjs\"",
156
- "priority": 1,
157
- "enabled": true,
158
- "timeout": 3,
159
- "blocking": false,
160
- "description": "Gemini stdio MCP 자동 감지 + 제거 (spawn EPERM 방지)"
161
- },
162
- {
163
- "id": "tfx-hub-ensure",
164
- "source": "triflux",
165
- "matcher": "*",
166
- "command": "node \"${PLUGIN_ROOT}/scripts/hub-ensure.mjs\"",
167
- "priority": 2,
168
- "enabled": true,
169
- "timeout": 8,
170
- "blocking": false,
171
- "description": "tfx-hub 서비스 헬스체크 및 시작"
172
- },
173
- {
174
- "id": "tfx-preflight-cache",
175
- "source": "triflux",
176
- "matcher": "*",
177
- "command": "node \"${PLUGIN_ROOT}/scripts/preflight-cache.mjs\"",
178
- "priority": 3,
179
- "enabled": true,
180
- "timeout": 5,
181
- "blocking": false,
182
- "description": "CLI/Hub 가용성 캐시 (hub-ensure 완료 후 실행)"
183
- },
184
- {
185
- "id": "tfx-mcp-gateway-ensure",
186
- "source": "triflux",
187
- "matcher": "*",
188
- "command": "node \"${PLUGIN_ROOT}/scripts/mcp-gateway-ensure.mjs\"",
189
- "priority": 4,
190
- "enabled": true,
191
- "timeout": 8,
192
- "blocking": false,
193
- "description": "supergateway MCP 서비스 헬스체크 및 자동 기동"
194
- },
195
- {
196
- "id": "ext-session-vault-start",
197
- "source": "session-vault",
198
- "matcher": "*",
199
- "command": "bash \"${HOME}/Desktop/Projects/tools/session-vault/scripts/start_hook.sh\"",
200
- "priority": 100,
201
- "enabled": true,
202
- "timeout": 10,
203
- "blocking": false,
204
- "description": "세션 볼트 로깅 시작"
205
- }
206
- ],
207
- "Stop": [
208
- {
209
- "id": "tfx-pipeline-stop",
210
- "source": "triflux",
211
- "matcher": "*",
212
- "command": "node \"${PLUGIN_ROOT}/hooks/pipeline-stop.mjs\"",
213
- "priority": 0,
214
- "enabled": true,
215
- "timeout": 5,
216
- "blocking": true,
217
- "description": "활성 파이프라인 감지 → 종료 차단"
218
- },
219
- {
220
- "id": "ext-session-vault-export",
221
- "source": "session-vault",
222
- "matcher": "*",
223
- "command": "bash \"${HOME}/Desktop/Projects/tools/session-vault/scripts/export_hook.sh\"",
224
- "priority": 100,
225
- "enabled": true,
226
- "timeout": 30,
227
- "blocking": false,
228
- "description": "세션 트랜스크립트 내보내기"
229
- },
230
- {
231
- "id": "ext-mcp-cleanup",
232
- "source": "system",
233
- "matcher": "*",
234
- "command": "powershell -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -File \"${HOME}/.claude/scripts/mcp-cleanup.ps1\"",
235
- "priority": 100,
236
- "enabled": true,
237
- "timeout": 8,
238
- "blocking": false,
239
- "description": "MCP 고아 프로세스 정리"
240
- }
241
- ],
242
- "SubagentStop": [
243
- {
244
- "id": "tfx-subagent-verifier",
245
- "source": "triflux",
246
- "matcher": "*",
247
- "command": "node \"${PLUGIN_ROOT}/hooks/subagent-verifier.mjs\"",
248
- "priority": 0,
249
- "enabled": true,
250
- "timeout": 3,
251
- "blocking": false,
252
- "description": "서브에이전트 결과 품질 체크"
253
- }
254
- ]
255
- }
256
- }
1
+ {
2
+ "$schema": "hook-registry-schema",
3
+ "version": 1,
4
+ "description": "훅 우선순위 레지스트리 — 오케스트레이터가 이 파일을 읽어 순차 실행한다. priority 낮을수록 먼저 실행.",
5
+ "defaults": {
6
+ "triflux_priority": 0,
7
+ "omc_priority": 50,
8
+ "external_priority": 100
9
+ },
10
+ "events": {
11
+ "PermissionRequest": [
12
+ {
13
+ "id": "tfx-permission-safe-allow",
14
+ "source": "triflux",
15
+ "matcher": "Bash",
16
+ "command": "node \"${PLUGIN_ROOT}/hooks/permission-safe-allow.mjs\"",
17
+ "priority": 0,
18
+ "enabled": true,
19
+ "timeout": 2,
20
+ "blocking": false,
21
+ "description": "안전한 repo-local Bash PermissionRequest 자동 허용 (#245)"
22
+ }
23
+ ],
24
+ "PreToolUse": [
25
+ {
26
+ "id": "tfx-safety-guard",
27
+ "source": "triflux",
28
+ "matcher": "Bash",
29
+ "command": "node \"${PLUGIN_ROOT}/hooks/safety-guard.mjs\"",
30
+ "priority": 0,
31
+ "enabled": true,
32
+ "timeout": 3,
33
+ "blocking": true,
34
+ "description": "위험 Bash 명령 사전 차단 (rm -rf, force push 등)"
35
+ },
36
+ {
37
+ "id": "tfx-agent-route-guard",
38
+ "source": "triflux",
39
+ "matcher": "Agent",
40
+ "command": "node \"${PLUGIN_ROOT}/hooks/agent-route-guard.mjs\"",
41
+ "priority": 0,
42
+ "enabled": true,
43
+ "timeout": 3,
44
+ "blocking": false,
45
+ "description": "서브에이전트 스폰 시 triflux 컨텍스트 주입"
46
+ },
47
+ {
48
+ "id": "tfx-cross-review-gate",
49
+ "source": "triflux",
50
+ "matcher": "Bash",
51
+ "command": "node \"${PLUGIN_ROOT}/scripts/cross-review-gate.mjs\"",
52
+ "priority": 1,
53
+ "enabled": true,
54
+ "timeout": 3,
55
+ "blocking": true,
56
+ "description": "git commit 전 교차 리뷰 미검증 파일 차단/경고"
57
+ },
58
+ {
59
+ "id": "omc-headless-guard",
60
+ "source": "omc",
61
+ "matcher": "Bash|Agent",
62
+ "command": "bash \"${HOME}/.claude/scripts/headless-guard-fast.sh\"",
63
+ "priority": 50,
64
+ "enabled": true,
65
+ "timeout": 3,
66
+ "blocking": false,
67
+ "description": "primary multiplexer headless 가드"
68
+ },
69
+ {
70
+ "id": "omc-tfx-gate-activate",
71
+ "source": "omc",
72
+ "matcher": "Skill",
73
+ "command": "node \"${HOME}/.claude/scripts/tfx-gate-activate.mjs\"",
74
+ "priority": 50,
75
+ "enabled": true,
76
+ "timeout": 2,
77
+ "blocking": false,
78
+ "description": "tfx-multi 상태 추적 게이트"
79
+ },
80
+ {
81
+ "id": "tfx-write-edit-passthrough",
82
+ "source": "triflux",
83
+ "matcher": "Edit|Write",
84
+ "command": "exit 0",
85
+ "priority": 999,
86
+ "enabled": true,
87
+ "blocking": false,
88
+ "description": "Edit/Write passthrough"
89
+ }
90
+ ],
91
+ "PostToolUse": [
92
+ {
93
+ "id": "tfx-cross-review-tracker",
94
+ "source": "triflux",
95
+ "matcher": "Edit|Write",
96
+ "command": "node \"${PLUGIN_ROOT}/hooks/cross-review-tracker.mjs\"",
97
+ "priority": 0,
98
+ "enabled": true,
99
+ "timeout": 3,
100
+ "blocking": false,
101
+ "description": "파일 수정 추적 → 교차 리뷰 nudge"
102
+ },
103
+ {
104
+ "id": "tfx-mcp-config-watcher",
105
+ "source": "triflux",
106
+ "matcher": "Edit|Write",
107
+ "command": "node \"${PLUGIN_ROOT}/hooks/mcp-config-watcher.mjs\"",
108
+ "priority": 1,
109
+ "enabled": true,
110
+ "timeout": 3,
111
+ "blocking": false,
112
+ "description": "감시 대상 MCP 설정 변경 감지 → stdio MCP 자동 치환"
113
+ },
114
+ {
115
+ "id": "tfx-post-tool-tips",
116
+ "source": "triflux",
117
+ "matcher": "Bash|Edit|Write",
118
+ "command": "node \"${PLUGIN_ROOT}/hooks/post-tool-tips.mjs\"",
119
+ "priority": 2,
120
+ "enabled": true,
121
+ "timeout": 2,
122
+ "blocking": false,
123
+ "description": "중요 경로 변경 시 opt-in rules reminder 주입 (#245)"
124
+ }
125
+ ],
126
+ "PostToolUseFailure": [
127
+ {
128
+ "id": "tfx-error-context",
129
+ "source": "triflux",
130
+ "matcher": "*",
131
+ "command": "node \"${PLUGIN_ROOT}/hooks/error-context.mjs\"",
132
+ "priority": 0,
133
+ "enabled": true,
134
+ "timeout": 3,
135
+ "blocking": false,
136
+ "description": "도구 실패 시 에러 힌트 자동 주입"
137
+ },
138
+ {
139
+ "id": "tfx-adaptive-collector",
140
+ "source": "triflux",
141
+ "matcher": "*",
142
+ "command": "node \"${PLUGIN_ROOT}/hooks/hook-adaptive-collector.mjs\"",
143
+ "priority": 1,
144
+ "enabled": true,
145
+ "timeout": 3,
146
+ "blocking": false,
147
+ "description": "에러 패턴 수집 → Neural Memory adaptive engine 학습"
148
+ }
149
+ ],
150
+ "UserPromptSubmit": [
151
+ {
152
+ "id": "tfx-keyword-detector",
153
+ "source": "triflux",
154
+ "matcher": "*",
155
+ "command": "node \"${PLUGIN_ROOT}/scripts/run.cjs\" \"${PLUGIN_ROOT}/scripts/keyword-detector.mjs\"",
156
+ "priority": 0,
157
+ "enabled": true,
158
+ "timeout": 5,
159
+ "blocking": false,
160
+ "description": "키워드 매칭 → 스킬 자동 라우팅"
161
+ }
162
+ ],
163
+ "SessionStart": [
164
+ {
165
+ "id": "tfx-setup",
166
+ "source": "triflux",
167
+ "matcher": "*",
168
+ "command": "node \"${PLUGIN_ROOT}/scripts/setup.mjs\"",
169
+ "priority": 0,
170
+ "enabled": true,
171
+ "timeout": 10,
172
+ "blocking": false,
173
+ "description": "triflux 환경 초기화"
174
+ },
175
+ {
176
+ "id": "tfx-mcp-safety-guard",
177
+ "source": "triflux",
178
+ "matcher": "*",
179
+ "command": "node \"${PLUGIN_ROOT}/scripts/mcp-safety-guard.mjs\"",
180
+ "priority": 1,
181
+ "enabled": true,
182
+ "timeout": 3,
183
+ "blocking": false,
184
+ "description": "Gemini stdio MCP 자동 감지 + 제거 (spawn EPERM 방지)"
185
+ },
186
+ {
187
+ "id": "tfx-hub-ensure",
188
+ "source": "triflux",
189
+ "matcher": "*",
190
+ "command": "node \"${PLUGIN_ROOT}/scripts/hub-ensure.mjs\"",
191
+ "priority": 2,
192
+ "enabled": true,
193
+ "timeout": 8,
194
+ "blocking": true,
195
+ "description": "tfx-hub 서비스 헬스체크 및 시작 (BLOCKING — 세션 시작 전 Hub 준비 보장)"
196
+ },
197
+ {
198
+ "id": "tfx-preflight-cache",
199
+ "source": "triflux",
200
+ "matcher": "*",
201
+ "command": "node \"${PLUGIN_ROOT}/scripts/preflight-cache.mjs\"",
202
+ "priority": 3,
203
+ "enabled": true,
204
+ "timeout": 5,
205
+ "blocking": false,
206
+ "description": "CLI/Hub 가용성 캐시 (hub-ensure 완료 후 실행)"
207
+ },
208
+ {
209
+ "id": "tfx-mcp-gateway-ensure",
210
+ "source": "triflux",
211
+ "matcher": "*",
212
+ "command": "node \"${PLUGIN_ROOT}/scripts/mcp-gateway-ensure.mjs\"",
213
+ "priority": 4,
214
+ "enabled": true,
215
+ "timeout": 8,
216
+ "blocking": false,
217
+ "description": "supergateway MCP 서비스 헬스체크 및 자동 기동"
218
+ },
219
+ {
220
+ "id": "tfx-session-stale-cleanup",
221
+ "source": "triflux",
222
+ "matcher": "*",
223
+ "command": "node \"${PLUGIN_ROOT}/scripts/session-stale-cleanup.mjs\"",
224
+ "priority": 5,
225
+ "enabled": true,
226
+ "timeout": 3,
227
+ "blocking": false,
228
+ "description": "이전 세션의 stale tfx-multi 상태 파일 정리 (#62)"
229
+ },
230
+ {
231
+ "id": "ext-session-vault-start",
232
+ "source": "session-vault",
233
+ "requires": "$HOME/Desktop/Projects/tools/session-vault",
234
+ "matcher": "*",
235
+ "command": "bash \"${HOME}/Desktop/Projects/tools/session-vault/scripts/start_hook.sh\"",
236
+ "priority": 100,
237
+ "enabled": false,
238
+ "timeout": 10,
239
+ "blocking": false,
240
+ "description": "세션 볼트 로깅 시작"
241
+ }
242
+ ],
243
+ "Stop": [
244
+ {
245
+ "id": "tfx-pipeline-stop",
246
+ "source": "triflux",
247
+ "matcher": "*",
248
+ "command": "node \"${PLUGIN_ROOT}/hooks/pipeline-stop.mjs\"",
249
+ "priority": 0,
250
+ "enabled": true,
251
+ "timeout": 5,
252
+ "blocking": true,
253
+ "description": "컨텍스트 guard/retry cap + 활성 파이프라인 감지 → Stop 차단"
254
+ },
255
+ {
256
+ "id": "ext-session-vault-export",
257
+ "source": "session-vault",
258
+ "requires": "$HOME/Desktop/Projects/tools/session-vault",
259
+ "matcher": "*",
260
+ "command": "bash \"${HOME}/Desktop/Projects/tools/session-vault/scripts/export_hook.sh\"",
261
+ "priority": 100,
262
+ "enabled": false,
263
+ "timeout": 30,
264
+ "blocking": false,
265
+ "description": "세션 트랜스크립트 내보내기"
266
+ },
267
+ {
268
+ "id": "ext-mcp-cleanup",
269
+ "source": "system",
270
+ "matcher": "*",
271
+ "command": "powershell -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -File \"${HOME}/.claude/scripts/mcp-cleanup.ps1\"",
272
+ "priority": 100,
273
+ "enabled": false,
274
+ "timeout": 8,
275
+ "blocking": false,
276
+ "description": "MCP 고아 프로세스 정리"
277
+ }
278
+ ],
279
+ "SessionEnd": [
280
+ {
281
+ "id": "tfx-session-end-cleanup",
282
+ "source": "triflux",
283
+ "matcher": "*",
284
+ "command": "node \"${PLUGIN_ROOT}/hooks/session-end-cleanup.mjs\"",
285
+ "priority": 0,
286
+ "enabled": true,
287
+ "timeout": 3,
288
+ "blocking": false,
289
+ "description": "세션 종료 시 lifecycle 상태 보고 및 opt-in 정리 (#245)"
290
+ }
291
+ ],
292
+ "SubagentStart": [
293
+ {
294
+ "id": "tfx-subagent-tracker",
295
+ "source": "triflux",
296
+ "matcher": "*",
297
+ "command": "node \"${PLUGIN_ROOT}/hooks/subagent-tracker.mjs\"",
298
+ "priority": 0,
299
+ "enabled": true,
300
+ "timeout": 2,
301
+ "blocking": false,
302
+ "description": "서브에이전트 lifecycle 시작/종료 상태 추적 (#245)"
303
+ }
304
+ ],
305
+ "SubagentStop": [
306
+ {
307
+ "id": "tfx-subagent-tracker",
308
+ "source": "triflux",
309
+ "matcher": "*",
310
+ "command": "node \"${PLUGIN_ROOT}/hooks/subagent-tracker.mjs\"",
311
+ "priority": 0,
312
+ "enabled": true,
313
+ "timeout": 2,
314
+ "blocking": false,
315
+ "description": "서브에이전트 lifecycle 시작/종료 상태 추적 (#245)"
316
+ },
317
+ {
318
+ "id": "tfx-subagent-verifier",
319
+ "source": "triflux",
320
+ "matcher": "*",
321
+ "command": "node \"${PLUGIN_ROOT}/hooks/subagent-verifier.mjs\"",
322
+ "priority": 1,
323
+ "enabled": true,
324
+ "timeout": 3,
325
+ "blocking": false,
326
+ "description": "서브에이전트 결과 품질 체크"
327
+ }
328
+ ],
329
+ "PreCompact": [
330
+ {
331
+ "id": "tfx-pre-compact-snapshot",
332
+ "source": "triflux",
333
+ "matcher": "*",
334
+ "command": "node \"${PLUGIN_ROOT}/hooks/pre-compact-snapshot.mjs\"",
335
+ "priority": 0,
336
+ "enabled": true,
337
+ "timeout": 3,
338
+ "blocking": false,
339
+ "description": "compact 직전 repo-local 진행 상태 스냅샷 주입 (#245)"
340
+ }
341
+ ]
342
+ }
343
+ }