claude-code-workflow 7.2.5 → 7.2.6

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 (221) hide show
  1. package/.claude/commands/workflow/analyze-with-file.md +11 -10
  2. package/.claude/skills/ccw-help/command.json +3 -3
  3. package/.claude/skills/ccw-help/index/all-commands.json +3 -3
  4. package/.claude/skills/ccw-help/index/by-category.json +3 -3
  5. package/.claude/skills/ccw-help/index/by-use-case.json +3 -3
  6. package/.claude/skills/skill-iter-tune/SKILL.md +382 -0
  7. package/.claude/skills/skill-iter-tune/phases/01-setup.md +144 -0
  8. package/.claude/skills/skill-iter-tune/phases/02-execute.md +292 -0
  9. package/.claude/skills/skill-iter-tune/phases/03-evaluate.md +312 -0
  10. package/.claude/skills/skill-iter-tune/phases/04-improve.md +186 -0
  11. package/.claude/skills/skill-iter-tune/phases/05-report.md +166 -0
  12. package/.claude/skills/skill-iter-tune/specs/evaluation-criteria.md +63 -0
  13. package/.claude/skills/skill-iter-tune/templates/eval-prompt.md +134 -0
  14. package/.claude/skills/skill-iter-tune/templates/execute-prompt.md +97 -0
  15. package/.claude/skills/team-roadmap-dev/SKILL.md +1 -1
  16. package/.claude/skills/team-roadmap-dev/roles/coordinator/role.md +1 -1
  17. package/.claude/skills/team-roadmap-dev/specs/team-config.json +1 -1
  18. package/ccw/dist/commands/install.d.ts.map +1 -1
  19. package/ccw/dist/commands/install.js +11 -9
  20. package/ccw/dist/commands/install.js.map +1 -1
  21. package/ccw/dist/tools/cli-executor-core.d.ts.map +1 -1
  22. package/ccw/dist/tools/cli-executor-core.js +0 -25
  23. package/ccw/dist/tools/cli-executor-core.js.map +1 -1
  24. package/ccw/dist/tools/cli-executor-state.d.ts.map +1 -1
  25. package/ccw/dist/tools/cli-executor-state.js +0 -31
  26. package/ccw/dist/tools/cli-executor-state.js.map +1 -1
  27. package/ccw/dist/tools/cli-history-store.d.ts.map +1 -1
  28. package/ccw/dist/tools/cli-history-store.js +1 -30
  29. package/ccw/dist/tools/cli-history-store.js.map +1 -1
  30. package/ccw/frontend/dist/assets/{AlertDialog-CFGtc76Y.js → AlertDialog-BMFUcfv_.js} +2 -2
  31. package/ccw/frontend/dist/assets/{AlertDialog-CFGtc76Y.js.map → AlertDialog-BMFUcfv_.js.map} +1 -1
  32. package/ccw/frontend/dist/assets/{AnalysisPage-Duxia_dG.js → AnalysisPage-Bxa333tD.js} +2 -2
  33. package/ccw/frontend/dist/assets/{AnalysisPage-Duxia_dG.js.map → AnalysisPage-Bxa333tD.js.map} +1 -1
  34. package/ccw/frontend/dist/assets/{ApiSettingsPage-CU9hesAE.js → ApiSettingsPage-BFVU-wcR.js} +2 -2
  35. package/ccw/frontend/dist/assets/{ApiSettingsPage-CU9hesAE.js.map → ApiSettingsPage-BFVU-wcR.js.map} +1 -1
  36. package/ccw/frontend/dist/assets/{CliModeToggle-DcdOFSvM.js → CliModeToggle-MDoFAJPL.js} +2 -2
  37. package/ccw/frontend/dist/assets/{CliModeToggle-DcdOFSvM.js.map → CliModeToggle-MDoFAJPL.js.map} +1 -1
  38. package/ccw/frontend/dist/assets/{CliSessionSharePage-oKN-GRIT.js → CliSessionSharePage-DkRmLiNN.js} +2 -2
  39. package/ccw/frontend/dist/assets/{CliSessionSharePage-oKN-GRIT.js.map → CliSessionSharePage-DkRmLiNN.js.map} +1 -1
  40. package/ccw/frontend/dist/assets/{CliViewerPage-_wUoHaY-.js → CliViewerPage-DN8jWddy.js} +2 -2
  41. package/ccw/frontend/dist/assets/{CliViewerPage-_wUoHaY-.js.map → CliViewerPage-DN8jWddy.js.map} +1 -1
  42. package/ccw/frontend/dist/assets/{CodexLensManagerPage-ClPNashJ.js → CodexLensManagerPage-Du_VAJtC.js} +2 -2
  43. package/ccw/frontend/dist/assets/{CodexLensManagerPage-ClPNashJ.js.map → CodexLensManagerPage-Du_VAJtC.js.map} +1 -1
  44. package/ccw/frontend/dist/assets/{Collapsible-Dladh9Eu.js → Collapsible-CF5bSyzt.js} +2 -2
  45. package/ccw/frontend/dist/assets/{Collapsible-Dladh9Eu.js.map → Collapsible-CF5bSyzt.js.map} +1 -1
  46. package/ccw/frontend/dist/assets/{CommandsManagerPage-B6DBb_Ew.js → CommandsManagerPage-Bm_P9I76.js} +2 -2
  47. package/ccw/frontend/dist/assets/{CommandsManagerPage-B6DBb_Ew.js.map → CommandsManagerPage-Bm_P9I76.js.map} +1 -1
  48. package/ccw/frontend/dist/assets/{DeepWikiPage-CDA3xm3R.js → DeepWikiPage-2YIlfWhz.js} +2 -2
  49. package/ccw/frontend/dist/assets/{DeepWikiPage-CDA3xm3R.js.map → DeepWikiPage-2YIlfWhz.js.map} +1 -1
  50. package/ccw/frontend/dist/assets/{EndpointsPage-Bu7iU0Wy.js → EndpointsPage-CMVNz5PY.js} +2 -2
  51. package/ccw/frontend/dist/assets/{EndpointsPage-Bu7iU0Wy.js.map → EndpointsPage-CMVNz5PY.js.map} +1 -1
  52. package/ccw/frontend/dist/assets/{ExplorerPage-xim2cboZ.js → ExplorerPage-C-KFz8YU.js} +2 -2
  53. package/ccw/frontend/dist/assets/{ExplorerPage-xim2cboZ.js.map → ExplorerPage-C-KFz8YU.js.map} +1 -1
  54. package/ccw/frontend/dist/assets/{FixSessionPage-BTFYoFQF.js → FixSessionPage-CdKND69l.js} +2 -2
  55. package/ccw/frontend/dist/assets/{FixSessionPage-BTFYoFQF.js.map → FixSessionPage-CdKND69l.js.map} +1 -1
  56. package/ccw/frontend/dist/assets/{FloatingFileBrowser-B30ANzTJ.js → FloatingFileBrowser-Bf4iqOSd.js} +2 -2
  57. package/ccw/frontend/dist/assets/{FloatingFileBrowser-B30ANzTJ.js.map → FloatingFileBrowser-Bf4iqOSd.js.map} +1 -1
  58. package/ccw/frontend/dist/assets/{FloatingPanel-Ds84B7Ob.js → FloatingPanel-CJbvABPb.js} +2 -2
  59. package/ccw/frontend/dist/assets/{FloatingPanel-Ds84B7Ob.js.map → FloatingPanel-CJbvABPb.js.map} +1 -1
  60. package/ccw/frontend/dist/assets/{GraphExplorerPage-DJ4YnFOQ.js → GraphExplorerPage-DPoozRTR.js} +2 -2
  61. package/ccw/frontend/dist/assets/{GraphExplorerPage-DJ4YnFOQ.js.map → GraphExplorerPage-DPoozRTR.js.map} +1 -1
  62. package/ccw/frontend/dist/assets/{HistoryPage-rzLVsw11.js → HistoryPage-DOMa9gJX.js} +2 -2
  63. package/ccw/frontend/dist/assets/{HistoryPage-rzLVsw11.js.map → HistoryPage-DOMa9gJX.js.map} +1 -1
  64. package/ccw/frontend/dist/assets/{HookManagerPage-DizO_dCP.js → HookManagerPage-Cfn2UEyy.js} +2 -2
  65. package/ccw/frontend/dist/assets/{HookManagerPage-DizO_dCP.js.map → HookManagerPage-Cfn2UEyy.js.map} +1 -1
  66. package/ccw/frontend/dist/assets/{InstallationsPage-BFamuE4y.js → InstallationsPage-qngOxLvm.js} +2 -2
  67. package/ccw/frontend/dist/assets/{InstallationsPage-BFamuE4y.js.map → InstallationsPage-qngOxLvm.js.map} +1 -1
  68. package/ccw/frontend/dist/assets/{IssueHubPage-DHwQWuUc.js → IssueHubPage-Cvf7tH8p.js} +2 -2
  69. package/ccw/frontend/dist/assets/{IssueHubPage-DHwQWuUc.js.map → IssueHubPage-Cvf7tH8p.js.map} +1 -1
  70. package/ccw/frontend/dist/assets/{LiteTasksPage-DMDkG7pi.js → LiteTasksPage-D20smVCY.js} +2 -2
  71. package/ccw/frontend/dist/assets/{LiteTasksPage-DMDkG7pi.js.map → LiteTasksPage-D20smVCY.js.map} +1 -1
  72. package/ccw/frontend/dist/assets/{McpManagerPage-CS2v_1OG.js → McpManagerPage-Bld27yu4.js} +2 -2
  73. package/ccw/frontend/dist/assets/{McpManagerPage-CS2v_1OG.js.map → McpManagerPage-Bld27yu4.js.map} +1 -1
  74. package/ccw/frontend/dist/assets/{MemoryPage-DhYPE-VC.js → MemoryPage-DmknNdBh.js} +2 -2
  75. package/ccw/frontend/dist/assets/{MemoryPage-DhYPE-VC.js.map → MemoryPage-DmknNdBh.js.map} +1 -1
  76. package/ccw/frontend/dist/assets/{NotFoundPage-BLmC7-ot.js → NotFoundPage-DdwPN1xU.js} +2 -2
  77. package/ccw/frontend/dist/assets/{NotFoundPage-BLmC7-ot.js.map → NotFoundPage-DdwPN1xU.js.map} +1 -1
  78. package/ccw/frontend/dist/assets/{OrchestratorPage-1jzSUFZW.js → OrchestratorPage-CgDdmvBg.js} +2 -2
  79. package/ccw/frontend/dist/assets/{OrchestratorPage-1jzSUFZW.js.map → OrchestratorPage-CgDdmvBg.js.map} +1 -1
  80. package/ccw/frontend/dist/assets/{ProjectOverviewPage-gWuAj-Cn.js → ProjectOverviewPage-9Ze9quxh.js} +2 -2
  81. package/ccw/frontend/dist/assets/{ProjectOverviewPage-gWuAj-Cn.js.map → ProjectOverviewPage-9Ze9quxh.js.map} +1 -1
  82. package/ccw/frontend/dist/assets/{PromptHistoryPage-q7ySVNHM.js → PromptHistoryPage-YRkBppOx.js} +2 -2
  83. package/ccw/frontend/dist/assets/{PromptHistoryPage-q7ySVNHM.js.map → PromptHistoryPage-YRkBppOx.js.map} +1 -1
  84. package/ccw/frontend/dist/assets/{ReviewSessionPage-DX1uT_nH.js → ReviewSessionPage-DSaeHw83.js} +2 -2
  85. package/ccw/frontend/dist/assets/{ReviewSessionPage-DX1uT_nH.js.map → ReviewSessionPage-DSaeHw83.js.map} +1 -1
  86. package/ccw/frontend/dist/assets/{RulesManagerPage-Bg6T5W-W.js → RulesManagerPage-BpGwS_jB.js} +2 -2
  87. package/ccw/frontend/dist/assets/{RulesManagerPage-Bg6T5W-W.js.map → RulesManagerPage-BpGwS_jB.js.map} +1 -1
  88. package/ccw/frontend/dist/assets/{SessionDetailPage-C_ig6JSh.js → SessionDetailPage-B_YHME7k.js} +2 -2
  89. package/ccw/frontend/dist/assets/{SessionDetailPage-C_ig6JSh.js.map → SessionDetailPage-B_YHME7k.js.map} +1 -1
  90. package/ccw/frontend/dist/assets/{SessionsPage-BENFqFDn.js → SessionsPage-bW6kEEib.js} +2 -2
  91. package/ccw/frontend/dist/assets/{SessionsPage-BENFqFDn.js.map → SessionsPage-bW6kEEib.js.map} +1 -1
  92. package/ccw/frontend/dist/assets/{SettingsPage-2c-oTxfz.js → SettingsPage-CSwUd2Bw.js} +4 -4
  93. package/ccw/frontend/dist/assets/{SettingsPage-2c-oTxfz.js.map → SettingsPage-CSwUd2Bw.js.map} +1 -1
  94. package/ccw/frontend/dist/assets/{SkillsManagerPage-GLo6DXnt.js → SkillsManagerPage-CyqKvFUi.js} +2 -2
  95. package/ccw/frontend/dist/assets/{SkillsManagerPage-GLo6DXnt.js.map → SkillsManagerPage-CyqKvFUi.js.map} +1 -1
  96. package/ccw/frontend/dist/assets/{SpecsSettingsPage-CRqMV90p.js → SpecsSettingsPage-DHqQNW_y.js} +2 -2
  97. package/ccw/frontend/dist/assets/{SpecsSettingsPage-CRqMV90p.js.map → SpecsSettingsPage-DHqQNW_y.js.map} +1 -1
  98. package/ccw/frontend/dist/assets/{Switch-vlMavMRD.js → Switch-s_-xzEWF.js} +2 -2
  99. package/ccw/frontend/dist/assets/{Switch-vlMavMRD.js.map → Switch-s_-xzEWF.js.map} +1 -1
  100. package/ccw/frontend/dist/assets/{TabsNavigation-CLKz7pWP.js → TabsNavigation-CU50UxOb.js} +2 -2
  101. package/ccw/frontend/dist/assets/{TabsNavigation-CLKz7pWP.js.map → TabsNavigation-CU50UxOb.js.map} +1 -1
  102. package/ccw/frontend/dist/assets/{TaskDrawer-BAFvNqF8.js → TaskDrawer-128XISsA.js} +2 -2
  103. package/ccw/frontend/dist/assets/{TaskDrawer-BAFvNqF8.js.map → TaskDrawer-128XISsA.js.map} +1 -1
  104. package/ccw/frontend/dist/assets/{TeamPage-C2IsDkAv.js → TeamPage-Bg_KII8B.js} +2 -2
  105. package/ccw/frontend/dist/assets/{TeamPage-C2IsDkAv.js.map → TeamPage-Bg_KII8B.js.map} +1 -1
  106. package/ccw/frontend/dist/assets/{TerminalDashboardPage-mgS-iKDm.js → TerminalDashboardPage-CQ9K2zwB.js} +2 -2
  107. package/ccw/frontend/dist/assets/{TerminalDashboardPage-mgS-iKDm.js.map → TerminalDashboardPage-CQ9K2zwB.js.map} +1 -1
  108. package/ccw/frontend/dist/assets/{archive-CxxK_YIp.js → archive--nR2vYUk.js} +2 -2
  109. package/ccw/frontend/dist/assets/{archive-CxxK_YIp.js.map → archive--nR2vYUk.js.map} +1 -1
  110. package/ccw/frontend/dist/assets/{archive-restore-DZsrBaeG.js → archive-restore-CZ7graO0.js} +2 -2
  111. package/ccw/frontend/dist/assets/{archive-restore-DZsrBaeG.js.map → archive-restore-CZ7graO0.js.map} +1 -1
  112. package/ccw/frontend/dist/assets/{arrow-right-BotRHOhr.js → arrow-right-ChKhpVhq.js} +2 -2
  113. package/ccw/frontend/dist/assets/{arrow-right-BotRHOhr.js.map → arrow-right-ChKhpVhq.js.map} +1 -1
  114. package/ccw/frontend/dist/assets/{bookmark-plus-C0MWZ3S9.js → bookmark-plus-X-JcgObI.js} +2 -2
  115. package/ccw/frontend/dist/assets/{bookmark-plus-C0MWZ3S9.js.map → bookmark-plus-X-JcgObI.js.map} +1 -1
  116. package/ccw/frontend/dist/assets/{bot-BcHFJXqD.js → bot-C3uo7Fkg.js} +2 -2
  117. package/ccw/frontend/dist/assets/{bot-BcHFJXqD.js.map → bot-C3uo7Fkg.js.map} +1 -1
  118. package/ccw/frontend/dist/assets/{braces-D_p0IZhP.js → braces-5wZupwrA.js} +2 -2
  119. package/ccw/frontend/dist/assets/{braces-D_p0IZhP.js.map → braces-5wZupwrA.js.map} +1 -1
  120. package/ccw/frontend/dist/assets/{circle-stop-Bt634NUt.js → circle-stop-DZ5hLKjQ.js} +2 -2
  121. package/ccw/frontend/dist/assets/{circle-stop-Bt634NUt.js.map → circle-stop-DZ5hLKjQ.js.map} +1 -1
  122. package/ccw/frontend/dist/assets/{cpu-DjeGKtvT.js → cpu-Dc8IS79i.js} +2 -2
  123. package/ccw/frontend/dist/assets/{cpu-DjeGKtvT.js.map → cpu-Dc8IS79i.js.map} +1 -1
  124. package/ccw/frontend/dist/assets/{ellipsis-vertical-BmNPuatq.js → ellipsis-vertical-B4pqbrsR.js} +2 -2
  125. package/ccw/frontend/dist/assets/{ellipsis-vertical-BmNPuatq.js.map → ellipsis-vertical-B4pqbrsR.js.map} +1 -1
  126. package/ccw/frontend/dist/assets/{eye-B0-xkP67.js → eye-BwniwXnu.js} +2 -2
  127. package/ccw/frontend/dist/assets/{eye-B0-xkP67.js.map → eye-BwniwXnu.js.map} +1 -1
  128. package/ccw/frontend/dist/assets/{eye-off-Bz0Fkli3.js → eye-off-BWntEdln.js} +2 -2
  129. package/ccw/frontend/dist/assets/{eye-off-Bz0Fkli3.js.map → eye-off-BWntEdln.js.map} +1 -1
  130. package/ccw/frontend/dist/assets/{file-json-PUAS4vBm.js → file-json-BDcmkaVn.js} +2 -2
  131. package/ccw/frontend/dist/assets/{file-json-PUAS4vBm.js.map → file-json-BDcmkaVn.js.map} +1 -1
  132. package/ccw/frontend/dist/assets/{file-text-BMeW5-Sb.js → file-text-DsqI3R_g.js} +2 -2
  133. package/ccw/frontend/dist/assets/{file-text-BMeW5-Sb.js.map → file-text-DsqI3R_g.js.map} +1 -1
  134. package/ccw/frontend/dist/assets/{filter-B4wgMvwi.js → filter-CQMcD8RT.js} +2 -2
  135. package/ccw/frontend/dist/assets/{filter-B4wgMvwi.js.map → filter-CQMcD8RT.js.map} +1 -1
  136. package/ccw/frontend/dist/assets/{folder-BSHjjjND.js → folder-jX77-MUi.js} +2 -2
  137. package/ccw/frontend/dist/assets/{folder-BSHjjjND.js.map → folder-jX77-MUi.js.map} +1 -1
  138. package/ccw/frontend/dist/assets/{gauge-7VRNEl22.js → gauge-yQjRXM3o.js} +2 -2
  139. package/ccw/frontend/dist/assets/{gauge-7VRNEl22.js.map → gauge-yQjRXM3o.js.map} +1 -1
  140. package/ccw/frontend/dist/assets/{globe-PvVHBjbW.js → globe-BecpCHYI.js} +2 -2
  141. package/ccw/frontend/dist/assets/{globe-PvVHBjbW.js.map → globe-BecpCHYI.js.map} +1 -1
  142. package/ccw/frontend/dist/assets/{grid-3x3-CsmmDlhN.js → grid-3x3-BrvzDFqU.js} +2 -2
  143. package/ccw/frontend/dist/assets/{grid-3x3-CsmmDlhN.js.map → grid-3x3-BrvzDFqU.js.map} +1 -1
  144. package/ccw/frontend/dist/assets/{hard-drive-D88EZgTY.js → hard-drive-B0cynodE.js} +2 -2
  145. package/ccw/frontend/dist/assets/{hard-drive-D88EZgTY.js.map → hard-drive-B0cynodE.js.map} +1 -1
  146. package/ccw/frontend/dist/assets/{hash-CZpNRWqt.js → hash-xOrTLxBg.js} +2 -2
  147. package/ccw/frontend/dist/assets/{hash-CZpNRWqt.js.map → hash-xOrTLxBg.js.map} +1 -1
  148. package/ccw/frontend/dist/assets/{history-DxN1mopa.js → history-BzXwj8RL.js} +2 -2
  149. package/ccw/frontend/dist/assets/{history-DxN1mopa.js.map → history-BzXwj8RL.js.map} +1 -1
  150. package/ccw/frontend/dist/assets/{index-C04xeBGC.js → index-B9aFbBPN.js} +2 -2
  151. package/ccw/frontend/dist/assets/{index-C04xeBGC.js.map → index-B9aFbBPN.js.map} +1 -1
  152. package/ccw/frontend/dist/assets/{index-BzGEkwIf.js → index-BNZGm_Ur.js} +2 -2
  153. package/ccw/frontend/dist/assets/{index-BzGEkwIf.js.map → index-BNZGm_Ur.js.map} +1 -1
  154. package/ccw/frontend/dist/assets/{index-bSgtHHOF.js → index-D3uMibtZ.js} +4 -4
  155. package/ccw/frontend/dist/assets/{index-bSgtHHOF.js.map → index-D3uMibtZ.js.map} +1 -1
  156. package/ccw/frontend/dist/assets/{index-BUiq2PUK.js → index-DflI9CwB.js} +2 -2
  157. package/ccw/frontend/dist/assets/{index-BUiq2PUK.js.map → index-DflI9CwB.js.map} +1 -1
  158. package/ccw/frontend/dist/assets/{index-CIoWWkDn.js → index-Dy0tUf1F.js} +2 -2
  159. package/ccw/frontend/dist/assets/{index-CIoWWkDn.js.map → index-Dy0tUf1F.js.map} +1 -1
  160. package/ccw/frontend/dist/assets/{index-DlcRFzFq.js → index-osmL8__2.js} +2 -2
  161. package/ccw/frontend/dist/assets/{index-DlcRFzFq.js.map → index-osmL8__2.js.map} +1 -1
  162. package/ccw/frontend/dist/assets/{layout-grid-BZqfuNG0.js → layout-grid-CWFZqQWu.js} +2 -2
  163. package/ccw/frontend/dist/assets/{layout-grid-BZqfuNG0.js.map → layout-grid-CWFZqQWu.js.map} +1 -1
  164. package/ccw/frontend/dist/assets/{lightbulb-DqJ4OHRL.js → lightbulb-BRLgsWe3.js} +2 -2
  165. package/ccw/frontend/dist/assets/{lightbulb-DqJ4OHRL.js.map → lightbulb-BRLgsWe3.js.map} +1 -1
  166. package/ccw/frontend/dist/assets/{link-2-Bq7fLkC9.js → link-2-BpKdq14u.js} +2 -2
  167. package/ccw/frontend/dist/assets/{link-2-Bq7fLkC9.js.map → link-2-BpKdq14u.js.map} +1 -1
  168. package/ccw/frontend/dist/assets/{link-dSLYjCIG.js → link-BxUCReDi.js} +2 -2
  169. package/ccw/frontend/dist/assets/{link-dSLYjCIG.js.map → link-BxUCReDi.js.map} +1 -1
  170. package/ccw/frontend/dist/assets/{list-Bm_CnR56.js → list-Ce9EsAg8.js} +2 -2
  171. package/ccw/frontend/dist/assets/{list-Bm_CnR56.js.map → list-Ce9EsAg8.js.map} +1 -1
  172. package/ccw/frontend/dist/assets/{map-pin-B5TELa0z.js → map-pin-CxzQV1hS.js} +2 -2
  173. package/ccw/frontend/dist/assets/{map-pin-B5TELa0z.js.map → map-pin-CxzQV1hS.js.map} +1 -1
  174. package/ccw/frontend/dist/assets/{messages-square-B9sWItdK.js → messages-square-Dyodk79r.js} +2 -2
  175. package/ccw/frontend/dist/assets/{messages-square-B9sWItdK.js.map → messages-square-Dyodk79r.js.map} +1 -1
  176. package/ccw/frontend/dist/assets/{minimize-2-Z1MYs_Tp.js → minimize-2-s0009UK9.js} +2 -2
  177. package/ccw/frontend/dist/assets/{minimize-2-Z1MYs_Tp.js.map → minimize-2-s0009UK9.js.map} +1 -1
  178. package/ccw/frontend/dist/assets/{package-EEv4N_Qk.js → package-C69biuJL.js} +2 -2
  179. package/ccw/frontend/dist/assets/{package-EEv4N_Qk.js.map → package-C69biuJL.js.map} +1 -1
  180. package/ccw/frontend/dist/assets/{plug-CEkvvYXh.js → plug-DERl-wQd.js} +2 -2
  181. package/ccw/frontend/dist/assets/{plug-CEkvvYXh.js.map → plug-DERl-wQd.js.map} +1 -1
  182. package/ccw/frontend/dist/assets/{power-B6Rod0u_.js → power-CdvaDgTh.js} +2 -2
  183. package/ccw/frontend/dist/assets/{power-B6Rod0u_.js.map → power-CdvaDgTh.js.map} +1 -1
  184. package/ccw/frontend/dist/assets/{save-DULWrB2g.js → save-C_Uot2e4.js} +2 -2
  185. package/ccw/frontend/dist/assets/{save-DULWrB2g.js.map → save-C_Uot2e4.js.map} +1 -1
  186. package/ccw/frontend/dist/assets/{send-C4z974WG.js → send-R1XtAXeP.js} +2 -2
  187. package/ccw/frontend/dist/assets/{send-C4z974WG.js.map → send-R1XtAXeP.js.map} +1 -1
  188. package/ccw/frontend/dist/assets/{square-check-big-CqEEw-V0.js → square-check-big-Cyqi4INj.js} +2 -2
  189. package/ccw/frontend/dist/assets/{square-check-big-CqEEw-V0.js.map → square-check-big-Cyqi4INj.js.map} +1 -1
  190. package/ccw/frontend/dist/assets/{square-pen-D-4BrMtQ.js → square-pen-BmLNjUUw.js} +2 -2
  191. package/ccw/frontend/dist/assets/{square-pen-D-4BrMtQ.js.map → square-pen-BmLNjUUw.js.map} +1 -1
  192. package/ccw/frontend/dist/assets/{star-CDVVM69o.js → star-CakKtIYu.js} +2 -2
  193. package/ccw/frontend/dist/assets/{star-CDVVM69o.js.map → star-CakKtIYu.js.map} +1 -1
  194. package/ccw/frontend/dist/assets/{style-CumJ7XC8.js → style-DdNmehyz.js} +2 -2
  195. package/ccw/frontend/dist/assets/{style-CumJ7XC8.js.map → style-DdNmehyz.js.map} +1 -1
  196. package/ccw/frontend/dist/assets/{target-Dr9SuV1Y.js → target-CUvfwM3S.js} +2 -2
  197. package/ccw/frontend/dist/assets/{target-Dr9SuV1Y.js.map → target-CUvfwM3S.js.map} +1 -1
  198. package/ccw/frontend/dist/assets/{test-tube-DzDRKk8F.js → test-tube-BVwrOGiZ.js} +2 -2
  199. package/ccw/frontend/dist/assets/{test-tube-DzDRKk8F.js.map → test-tube-BVwrOGiZ.js.map} +1 -1
  200. package/ccw/frontend/dist/assets/{upload-CihSmIM7.js → upload-CY1NwcDw.js} +2 -2
  201. package/ccw/frontend/dist/assets/{upload-CihSmIM7.js.map → upload-CY1NwcDw.js.map} +1 -1
  202. package/ccw/frontend/dist/assets/{useApiSettings-CevxWX2z.js → useApiSettings-9JuzUfPE.js} +2 -2
  203. package/ccw/frontend/dist/assets/{useApiSettings-CevxWX2z.js.map → useApiSettings-9JuzUfPE.js.map} +1 -1
  204. package/ccw/frontend/dist/assets/{useCli-jVaF89uU.js → useCli-Bb7Zo-OI.js} +2 -2
  205. package/ccw/frontend/dist/assets/{useCli-jVaF89uU.js.map → useCli-Bb7Zo-OI.js.map} +1 -1
  206. package/ccw/frontend/dist/assets/{useCommands-D4uGmNpF.js → useCommands-BUu-hUYI.js} +2 -2
  207. package/ccw/frontend/dist/assets/{useCommands-D4uGmNpF.js.map → useCommands-BUu-hUYI.js.map} +1 -1
  208. package/ccw/frontend/dist/assets/{useDebounce-BEYmuZYP.js → useDebounce-CptXgLBn.js} +2 -2
  209. package/ccw/frontend/dist/assets/{useDebounce-BEYmuZYP.js.map → useDebounce-CptXgLBn.js.map} +1 -1
  210. package/ccw/frontend/dist/assets/{useFileExplorer-DEv0DVy7.js → useFileExplorer-B7dN8VT1.js} +2 -2
  211. package/ccw/frontend/dist/assets/{useFileExplorer-DEv0DVy7.js.map → useFileExplorer-B7dN8VT1.js.map} +1 -1
  212. package/ccw/frontend/dist/assets/{useLocale-BRJreqvl.js → useLocale-D6USNXOr.js} +2 -2
  213. package/ccw/frontend/dist/assets/{useLocale-BRJreqvl.js.map → useLocale-D6USNXOr.js.map} +1 -1
  214. package/ccw/frontend/dist/assets/{useSkills-lnfeXe9l.js → useSkills-r8yfiQ-u.js} +3 -3
  215. package/ccw/frontend/dist/assets/{useSkills-lnfeXe9l.js.map → useSkills-r8yfiQ-u.js.map} +1 -1
  216. package/ccw/frontend/dist/assets/{useSystemSettings-PlxVdbXI.js → useSystemSettings-BVWDQLMy.js} +2 -2
  217. package/ccw/frontend/dist/assets/{useSystemSettings-PlxVdbXI.js.map → useSystemSettings-BVWDQLMy.js.map} +1 -1
  218. package/ccw/frontend/dist/assets/{wand-sparkles-BbqUxeEg.js → wand-sparkles-Zdaej5bR.js} +2 -2
  219. package/ccw/frontend/dist/assets/{wand-sparkles-BbqUxeEg.js.map → wand-sparkles-Zdaej5bR.js.map} +1 -1
  220. package/ccw/frontend/dist/index.html +1 -1
  221. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
- import{O as Me,u as $,r as x,j as e,C as T,dq as J,c as S,B as N,e as w,T as Ce,cy as me,ap as xe,x as Pe,y as He,z as Te,A as ze,I as L,bO as Ne,aq as ue,ar as ge,as as pe,at as he,au as W,G as Ue,Z as B,cQ as X,S as Oe,W as De,ck as Ee,cB as Ie,a1 as qe,dr as Re,af as We,N as Le,bq as _e,an as Ke,aF as $e,ab as Ge,U as Ae,aQ as Fe,M as Y,aw as ye,ds as Ve,ao as Qe,a7 as fe,dt as Ze,bY as Je,b7 as Ye,R as Be,b as Xe}from"./index-bSgtHHOF.js";import{A as et,a as tt,b as st,c as it,d as ot,e as at,f as rt,g as nt}from"./AlertDialog-CFGtc76Y.js";import{P as lt,a as ct}from"./power-B6Rod0u_.js";import{S as dt}from"./square-pen-D-4BrMtQ.js";import{S as mt}from"./send-C4z974WG.js";import{i as xt,j as ut,k as gt}from"./useCli-jVaF89uU.js";import{C as pt}from"./circle-stop-Bt634NUt.js";import{W as ke}from"./wand-sparkles-BbqUxeEg.js";import"./useLocale-BRJreqvl.js";import"./errorSanitizer-IY9pf5g4.js";/**
1
+ import{O as Me,u as $,r as x,j as e,C as T,dq as J,c as S,B as N,e as w,T as Ce,cy as me,ap as xe,x as Pe,y as He,z as Te,A as ze,I as L,bO as Ne,aq as ue,ar as ge,as as pe,at as he,au as W,G as Ue,Z as B,cQ as X,S as Oe,W as De,ck as Ee,cB as Ie,a1 as qe,dr as Re,af as We,N as Le,bq as _e,an as Ke,aF as $e,ab as Ge,U as Ae,aQ as Fe,M as Y,aw as ye,ds as Ve,ao as Qe,a7 as fe,dt as Ze,bY as Je,b7 as Ye,R as Be,b as Xe}from"./index-D3uMibtZ.js";import{A as et,a as tt,b as st,c as it,d as ot,e as at,f as rt,g as nt}from"./AlertDialog-BMFUcfv_.js";import{P as lt,a as ct}from"./power-CdvaDgTh.js";import{S as dt}from"./square-pen-BmLNjUUw.js";import{S as mt}from"./send-R1XtAXeP.js";import{i as xt,j as ut,k as gt}from"./useCli-Bb7Zo-OI.js";import{C as pt}from"./circle-stop-DZ5hLKjQ.js";import{W as ke}from"./wand-sparkles-Zdaej5bR.js";import"./useLocale-D6USNXOr.js";import"./errorSanitizer-IY9pf5g4.js";/**
2
2
  * @license lucide-react v0.460.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
6
  */const ce=Me("FileChartColumnIncreasing",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["path",{d:"M12 18v-4",key:"q1q25u"}],["path",{d:"M16 18v-6",key:"15y0np"}]]);function ht(t){switch(t){case"SessionStart":return"🎬";case"UserPromptSubmit":return"⚡";case"PreToolUse":return"🔧";case"PostToolUse":return"✅";case"Stop":return"🛑";case"Notification":return"🔔";case"SubagentStart":return"🚀";case"SubagentStop":return"🏁";case"PreCompact":return"📦";case"SessionEnd":return"👋";case"PostToolUseFailure":return"❌";case"PermissionRequest":return"🔐";default:return"📌"}}function ft(t){switch(t){case"SessionStart":case"UserPromptSubmit":case"SubagentStart":return"default";case"PreToolUse":case"Stop":case"PreCompact":case"PermissionRequest":return"secondary";case"PostToolUse":case"Notification":case"SubagentStop":case"SessionEnd":case"PostToolUseFailure":return"outline";default:return"outline"}}const jt={"Session Start Notify":"session-start-notify","Session State Watch":"session-state-watch","Stop Notify":"stop-notify","Auto Format on Write":"auto-format-on-write","Auto Lint on Write":"auto-lint-on-write","Block Sensitive Files":"block-sensitive-files","Git Auto Stage":"git-auto-stage","Post Edit Index":"post-edit-index","Session End Summary":"session-end-summary","Project State Inject":"project-state-inject","Memory V2 Extract":"memory-v2-extract","Memory V2 Auto Consolidate":"memory-v2-auto-consolidate","Memory Sync Dashboard":"memory-sync-dashboard"};function bt(t,s){const j=`cliHooks.templates.templates.${t}.name`;try{const g=s({id:j});if(g&&!g.includes("cliHooks.templates.templates"))return g}catch{}const i=jt[t];if(i){const g=`cliHooks.templates.templates.${i}.name`;try{const r=s({id:g});if(r&&!r.includes("cliHooks.templates.templates"))return r}catch{}}return t}function wt({hook:t,isExpanded:s,onToggleExpand:j,onToggle:i,onEdit:g,onDelete:r}){const{formatMessage:n}=$(),[C,d]=x.useState(!1),h=bt(t.name,n),P=()=>{i(t.name,!t.enabled)},z=()=>{g(t)},p=()=>{d(!0)},k=()=>{d(!1),r(t.name)},D=()=>{d(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(T,{className:S("overflow-hidden",!t.enabled&&"opacity-60"),children:[e.jsx("div",{className:"p-4",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx("div",{className:S("p-2 rounded-lg flex-shrink-0",t.enabled?"bg-primary/10":"bg-muted"),children:e.jsx(J,{className:S("w-4 h-4",t.enabled?"text-primary":"text-muted-foreground")})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:h}),e.jsxs(N,{variant:ft(t.trigger),className:"text-xs flex-shrink-0",children:[e.jsx("span",{className:"mr-1",children:ht(t.trigger)}),n({id:`cliHooks.trigger.${t.trigger}`})]}),e.jsx(N,{variant:t.enabled?"default":"secondary",className:"text-xs flex-shrink-0",children:t.enabled?n({id:"common.status.enabled"}):n({id:"common.status.disabled"})})]}),t.description&&e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:t.description})]})]}),e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[e.jsx(w,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:P,title:t.enabled?n({id:"cliHooks.actions.disable"}):n({id:"cliHooks.actions.enable"}),children:t.enabled?e.jsx(lt,{className:"w-4 h-4 text-success"}):e.jsx(ct,{className:"w-4 h-4 text-muted-foreground"})}),e.jsx(w,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:z,title:n({id:"common.actions.edit"}),children:e.jsx(dt,{className:"w-4 h-4"})}),e.jsx(w,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:p,title:n({id:"common.actions.delete"}),children:e.jsx(Ce,{className:"w-4 h-4 text-destructive"})}),e.jsx(w,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:j,title:n(s?{id:"cliHooks.actions.collapse"}:{id:"cliHooks.actions.expand"}),children:s?e.jsx(me,{className:"w-4 h-4"}):e.jsx(xe,{className:"w-4 h-4"})})]})]})}),s&&e.jsxs("div",{className:"border-t border-border bg-muted/30 p-4 space-y-3",children:[t.description&&e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:n({id:"cliHooks.form.description"})}),e.jsx("p",{className:"text-sm text-foreground mt-1",children:t.description})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:n({id:"cliHooks.form.matcher"})}),e.jsx("p",{className:"text-sm text-foreground mt-1 font-mono bg-muted px-2 py-1 rounded",children:t.matcher||n({id:"cliHooks.allTools"})})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:n({id:"cliHooks.form.command"})}),e.jsx("p",{className:"text-sm text-foreground mt-1 font-mono bg-muted px-2 py-1 rounded break-all max-h-32 overflow-y-auto",children:t.command||t.script||"N/A"})]})]})]}),e.jsx(et,{open:C,onOpenChange:d,children:e.jsxs(tt,{children:[e.jsxs(st,{children:[e.jsx(it,{children:"Delete CLI Hook?"}),e.jsxs(ot,{children:['This action cannot be undone. The hook "',h,'" will be permanently deleted.']})]}),e.jsxs(at,{children:[e.jsx(rt,{onClick:D,children:"Cancel"}),e.jsx(nt,{onClick:k,children:"Delete"})]})]})})]})}function Nt(t){const s={};return t.name.trim()?/^[a-zA-Z0-9_-]+$/.test(t.name)||(s.name="validation.nameInvalid"):s.name="validation.nameRequired",t.trigger||(s.trigger="validation.triggerRequired"),t.command.trim()||(s.command="validation.commandRequired"),s}function yt({mode:t,hook:s,open:j,onClose:i,onSave:g}){const{formatMessage:r}=$(),[n,C]=x.useState({name:"",description:"",trigger:"PostToolUse",matcher:"",command:""}),[d,h]=x.useState({}),[P,z]=x.useState(!1);x.useEffect(()=>{j&&(C(t==="edit"&&s?{name:s.name,description:s.description||"",trigger:s.trigger,matcher:s.matcher||"",command:s.command||s.script||""}:{name:"",description:"",trigger:"PostToolUse",matcher:"",command:""}),h({}))},[j,t,s]);const p=(c,E)=>{C(v=>({...v,[c]:E})),d[c]&&h(v=>({...v,[c]:void 0}))},k=async()=>{const c=Nt(n);if(Object.keys(c).length>0){h(c);return}z(!0);try{await g(n),i()}catch(E){console.error("Failed to save hook:",E)}finally{z(!1)}},D=[{value:"SessionStart",label:"cliHooks.trigger.SessionStart"},{value:"UserPromptSubmit",label:"cliHooks.trigger.UserPromptSubmit"},{value:"PreToolUse",label:"cliHooks.trigger.PreToolUse"},{value:"PostToolUse",label:"cliHooks.trigger.PostToolUse"},{value:"Stop",label:"cliHooks.trigger.Stop"},{value:"Notification",label:"cliHooks.trigger.Notification"},{value:"SubagentStart",label:"cliHooks.trigger.SubagentStart"},{value:"SubagentStop",label:"cliHooks.trigger.SubagentStop"},{value:"PreCompact",label:"cliHooks.trigger.PreCompact"},{value:"SessionEnd",label:"cliHooks.trigger.SessionEnd"},{value:"PostToolUseFailure",label:"cliHooks.trigger.PostToolUseFailure"},{value:"PermissionRequest",label:"cliHooks.trigger.PermissionRequest"}];return e.jsx(Pe,{open:j,onOpenChange:i,children:e.jsxs(He,{className:"sm:max-w-[600px]",children:[e.jsx(Te,{children:e.jsx(ze,{children:t==="create"?r({id:"cliHooks.dialog.createTitle"}):r({id:"cliHooks.dialog.editTitle"},{hookName:s==null?void 0:s.name})})}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"hook-name",className:"text-sm font-medium text-foreground",children:[r({id:"cliHooks.form.name"})," *"]}),e.jsx(L,{id:"hook-name",value:n.name,onChange:c=>p("name",c.target.value),placeholder:r({id:"cliHooks.form.namePlaceholder"}),className:"mt-1",error:!!d.name}),d.name&&e.jsx("p",{className:"text-xs text-destructive mt-1",children:r({id:`cliHooks.${d.name}`})})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"hook-description",className:"text-sm font-medium text-foreground",children:r({id:"cliHooks.form.description"})}),e.jsx(Ne,{id:"hook-description",value:n.description,onChange:c=>p("description",c.target.value),placeholder:r({id:"cliHooks.form.descriptionPlaceholder"}),className:"mt-1",rows:2})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"hook-trigger",className:"text-sm font-medium text-foreground",children:[r({id:"cliHooks.form.trigger"})," *"]}),e.jsxs(ue,{value:n.trigger,onValueChange:c=>p("trigger",c),children:[e.jsx(ge,{className:"mt-1",id:"hook-trigger",children:e.jsx(pe,{})}),e.jsx(he,{children:D.map(c=>e.jsx(W,{value:c.value,children:r({id:c.label})},c.value))})]}),d.trigger&&e.jsx("p",{className:"text-xs text-destructive mt-1",children:r({id:`cliHooks.${d.trigger}`})})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"hook-matcher",className:"text-sm font-medium text-foreground",children:r({id:"cliHooks.form.matcher"})}),e.jsx(L,{id:"hook-matcher",value:n.matcher,onChange:c=>p("matcher",c.target.value),placeholder:r({id:"cliHooks.form.matcherPlaceholder"}),className:"mt-1 font-mono"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:r({id:"cliHooks.form.matcherHelp"})})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"hook-command",className:"text-sm font-medium text-foreground",children:[r({id:"cliHooks.form.command"})," *"]}),e.jsx(Ne,{id:"hook-command",value:n.command,onChange:c=>p("command",c.target.value),placeholder:r({id:"cliHooks.form.commandPlaceholder"}),className:"mt-1 font-mono text-sm",rows:4,error:!!d.command}),d.command&&e.jsx("p",{className:"text-xs text-destructive mt-1",children:r({id:`cliHooks.${d.command}`})}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:r({id:"cliHooks.form.commandHelp"})})]})]}),e.jsxs(Ue,{children:[e.jsx(w,{variant:"outline",onClick:i,disabled:P,children:r({id:"common.actions.cancel"})}),e.jsx(w,{onClick:k,disabled:P,children:r(P?{id:"common.actions.saving"}:{id:"common.actions.save"})})]})]})})}const je=[{id:"session-start-notify",name:"Session Start Notify",description:"Notify dashboard when a new workflow session is created",category:"notification",trigger:"SessionStart"},{id:"session-state-watch",name:"Session State Watch",description:"Watch for session metadata file changes (workflow-session.json)",category:"notification",trigger:"PostToolUse",matcher:"Write|Edit"},{id:"stop-notify",name:"Stop Notify",description:"Notify dashboard when Claude finishes responding",category:"notification",trigger:"Stop"},{id:"memory-sync-dashboard",name:"Memory Sync Dashboard",description:"Sync memory V2 status to dashboard on changes",category:"notification",trigger:"PostToolUse",matcher:"mcp__ccw-tools__core_memory"},{id:"auto-format-on-write",name:"Auto Format on Write",description:"Auto-format files after Claude writes or edits them",category:"automation",trigger:"PostToolUse",matcher:"Write|Edit"},{id:"auto-lint-on-write",name:"Auto Lint on Write",description:"Auto-lint files after Claude writes or edits them",category:"automation",trigger:"PostToolUse",matcher:"Write|Edit"},{id:"git-auto-stage",name:"Git Auto Stage",description:"Auto stage all modified files when Claude finishes responding",category:"automation",trigger:"Stop"},{id:"block-sensitive-files",name:"Block Sensitive Files",description:"Block modifications to sensitive files (.env, secrets, credentials)",category:"protection",trigger:"PreToolUse",matcher:"Write|Edit"},{id:"danger-bash-confirm",name:"Danger Bash Confirm",description:"Require confirmation for dangerous bash commands",category:"protection",trigger:"PreToolUse",matcher:"Bash"},{id:"danger-file-protection",name:"Danger File Protection",description:"Block modifications to protected files",category:"protection",trigger:"PreToolUse",matcher:"Write|Edit"},{id:"danger-git-destructive",name:"Danger Git Destructive",description:"Require confirmation for destructive git operations",category:"protection",trigger:"PreToolUse",matcher:"Bash"},{id:"danger-network-confirm",name:"Danger Network Confirm",description:"Require confirmation for network operations",category:"protection",trigger:"PreToolUse",matcher:"Bash|WebFetch"},{id:"danger-system-paths",name:"Danger System Paths",description:"Block modifications to system paths",category:"protection",trigger:"PreToolUse",matcher:"Write|Edit|Bash"},{id:"danger-permission-change",name:"Danger Permission Change",description:"Require confirmation for permission changes",category:"protection",trigger:"PreToolUse",matcher:"Bash"},{id:"post-edit-index",name:"Post Edit Index",description:"Notify indexing service when files are modified",category:"indexing",trigger:"PostToolUse",matcher:"Write|Edit"},{id:"session-end-summary",name:"Session End Summary",description:"Send session summary to dashboard on session end",category:"indexing",trigger:"Stop"},{id:"memory-auto-compress",name:"Auto Memory Compress",description:"Automatically compress memory when entries exceed threshold",category:"utility",trigger:"Stop"},{id:"memory-preview-extract",name:"Memory Preview & Extract",description:"Preview extraction queue and extract eligible sessions",category:"utility",trigger:"SessionStart"},{id:"memory-status-check",name:"Memory Status Check",description:"Check memory extraction and consolidation status",category:"utility",trigger:"SessionStart"},{id:"memory-v2-extract",name:"Memory V2 Extract",description:"Trigger Phase 1 extraction when session ends",category:"utility",trigger:"Stop"},{id:"memory-v2-auto-consolidate",name:"Memory V2 Auto Consolidate",description:"Trigger Phase 2 consolidation after extraction jobs complete",category:"utility",trigger:"Stop"}],ve={notification:{icon:Ie,color:"text-blue-500",bg:"bg-blue-500/10"},indexing:{icon:Ee,color:"text-purple-500",bg:"bg-purple-500/10"},automation:{icon:De,color:"text-orange-500",bg:"bg-orange-500/10"},utility:{icon:Oe,color:"text-gray-500",bg:"bg-gray-500/10"},protection:{icon:X,color:"text-red-500",bg:"bg-red-500/10"}},kt={"session-start-notify":mt,"session-state-watch":ce,"stop-notify":Ie,"auto-format-on-write":We,"auto-lint-on-write":Re,"block-sensitive-files":X,"git-auto-stage":qe,"post-edit-index":Ee,"session-end-summary":ce,"project-state-inject":ce};function vt(t,s){return{notification:s({id:"cliHooks.templates.categories.notification"}),indexing:s({id:"cliHooks.templates.categories.indexing"}),automation:s({id:"cliHooks.templates.categories.automation"}),utility:s({id:"cliHooks.templates.categories.utility"}),protection:s({id:"cliHooks.templates.categories.protection"})}[t]}function St({onInstallTemplate:t,installedTemplates:s,isLoading:j=!1,installingTemplateId:i=null}){const{formatMessage:g}=$(),r=x.useMemo(()=>je.reduce((d,h)=>(d[h.category]||(d[h.category]=[]),d[h.category].push(h),d),{}),[]),n=["notification","indexing","automation","protection","utility"],C=async d=>{await t(d)};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(B,{className:"w-5 h-5 text-primary"}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-foreground",children:g({id:"cliHooks.templates.title"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:g({id:"cliHooks.templates.description"})})]})]}),n.map(d=>{const h=r[d];if(!h||h.length===0)return null;const{icon:P,color:z}=ve[d];return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(P,{className:S("w-4 h-4",z)}),e.jsx("h3",{className:"text-sm font-medium text-foreground",children:vt(d,g)}),e.jsx(N,{variant:"outline",className:"text-xs",children:h.length})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:h.map(p=>{const k=s.includes(p.id),D=i===p.id,c=kt[p.id]||B,{color:E,bg:v}=ve[p.category];return e.jsxs(T,{className:S("p-4 flex flex-col gap-2 transition-colors",k&&"opacity-70"),children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:S("p-2 rounded-lg shrink-0",v),children:e.jsx(c,{className:S("w-4 h-4",E)})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h4",{className:"text-sm font-medium text-foreground leading-tight",children:g({id:`cliHooks.templates.templates.${p.id}.name`,defaultMessage:p.name})}),e.jsxs("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[e.jsx(N,{variant:"secondary",className:"text-[10px] px-1.5 py-0",children:g({id:`cliHooks.trigger.${p.trigger}`})}),p.matcher&&e.jsx(N,{variant:"outline",className:"text-[10px] px-1.5 py-0 font-mono",children:p.matcher})]})]}),e.jsx(w,{size:"sm",variant:"ghost",disabled:k||D,onClick:()=>C(p.id),className:S("h-8 w-8 p-0 shrink-0 rounded-full",k?"text-green-500 hover:text-green-500":"text-primary hover:bg-primary/10"),title:g(k?{id:"cliHooks.templates.actions.installed"}:{id:"cliHooks.templates.actions.install"}),children:D?e.jsx(Le,{className:"w-4 h-4 animate-spin"}):k?e.jsx(_e,{className:"w-4 h-4"}):e.jsx(Ke,{className:"w-4 h-4"})})]}),e.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed flex-1 pl-11",children:g({id:`cliHooks.templates.templates.${p.id}.description`,defaultMessage:p.description})})]},p.id)})})]},d)})]})}function be(){if(typeof window>"u"||typeof window.navigator>"u")return"linux";const t=window.navigator.userAgent;return t.includes("Win")?"windows":t.includes("Mac")?"macos":"linux"}function Ct(t){switch(t??be()){case"windows":return"cmd";case"macos":return"zsh";case"linux":return"bash";default:return"bash"}}function q(t){return{windows:"Windows",macos:"macOS",linux:"Linux"}[t]}function Pt(t){return{cmd:"Command Prompt (cmd.exe)",bash:"Bash",powershell:"PowerShell",zsh:"Zsh"}[t]}function Ht(t,s){var r;const j=s??be(),i=[],g=[];if((r=t.incompatiblePlatforms)!=null&&r.includes(j))return i.push(`This hook is not compatible with ${q(j)}. Incompatible platform detected.`),{compatible:!1,issues:i,warnings:g};if(t.requiredPlatforms&&t.requiredPlatforms.length>0&&!t.requiredPlatforms.includes(j)){const n=t.requiredPlatforms.map(q).join(", ");return i.push(`This hook requires one of: ${n}. Current platform: ${q(j)}.`),{compatible:!1,issues:i,warnings:g}}if(t.optionalPlatforms&&t.optionalPlatforms.length>0&&!t.optionalPlatforms.includes(j)){const n=t.optionalPlatforms.map(q).join(", ");g.push(`This hook has optional features for: ${n}. Some features may not work on ${q(j)}.`)}return{compatible:!0,issues:i,warnings:g}}const de={"memory-update":{requiredPlatforms:void 0,optionalPlatforms:void 0,incompatiblePlatforms:[]},"danger-protection":{requiredPlatforms:void 0,optionalPlatforms:void 0,incompatiblePlatforms:[]},"skill-context":{requiredPlatforms:void 0,optionalPlatforms:void 0,incompatiblePlatforms:[]}},Se={"memory-update-queue":"memory-auto-compress","danger-bash-confirm":"danger-bash-confirm","danger-file-protection":"danger-file-protection","danger-git-destructive":"danger-git-destructive","danger-network-confirm":"danger-network-confirm","danger-system-paths":"danger-system-paths","danger-permission-change":"danger-permission-change"},Z=[{id:"bash-confirm",templateId:"danger-bash-confirm",labelKey:"cliHooks.wizards.dangerProtection.options.bashConfirm",descKey:"cliHooks.wizards.dangerProtection.options.bashConfirmDesc"},{id:"file-protection",templateId:"danger-file-protection",labelKey:"cliHooks.wizards.dangerProtection.options.fileProtection",descKey:"cliHooks.wizards.dangerProtection.options.fileProtectionDesc"},{id:"git-destructive",templateId:"danger-git-destructive",labelKey:"cliHooks.wizards.dangerProtection.options.gitDestructive",descKey:"cliHooks.wizards.dangerProtection.options.gitDestructiveDesc"},{id:"network-confirm",templateId:"danger-network-confirm",labelKey:"cliHooks.wizards.dangerProtection.options.networkConfirm",descKey:"cliHooks.wizards.dangerProtection.options.networkConfirmDesc"},{id:"system-paths",templateId:"danger-system-paths",labelKey:"cliHooks.wizards.dangerProtection.options.systemPaths",descKey:"cliHooks.wizards.dangerProtection.options.systemPathsDesc"},{id:"permission-change",templateId:"danger-permission-change",labelKey:"cliHooks.wizards.dangerProtection.options.permissionChange",descKey:"cliHooks.wizards.dangerProtection.options.permissionChangeDesc"}],K={"memory-update":{title:"cliHooks.wizards.memoryUpdate.title",description:"cliHooks.wizards.memoryUpdate.description",icon:Fe,trigger:"Stop",platformRequirements:de["memory-update"]},"danger-protection":{title:"cliHooks.wizards.dangerProtection.title",description:"cliHooks.wizards.dangerProtection.description",icon:X,trigger:"PreToolUse",platformRequirements:de["danger-protection"]},"skill-context":{title:"cliHooks.wizards.skillContext.title",description:"cliHooks.wizards.skillContext.description",icon:Ae,trigger:"UserPromptSubmit",platformRequirements:de["skill-context"]}};function Tt({wizardType:t,open:s,onClose:j}){const{formatMessage:i}=$(),g=$e(),[r,n]=x.useState(1),[C,d]=x.useState("linux"),[h,P]=x.useState("project"),[z,p]=x.useState(!1),{data:k,isLoading:D}=Ge({queryKey:["skills"],queryFn:()=>Je(),enabled:s&&t==="skill-context"});x.useEffect(()=>{s&&d(be())},[s]);const[c,E]=x.useState({tool:"gemini",threshold:5,timeout:300}),[v,ee]=x.useState({selectedOptions:["bash-confirm","file-protection","git-destructive"]}),[y,F]=x.useState({mode:"keyword",skillConfigs:[{skill:"",keywords:""}]}),I=K[t],U=Ht(I.platformRequirements,C),G=()=>{r<3&&n(a=>a+1)},_=()=>{r>1&&n(a=>a-1)},R=()=>{n(1),j()},te=async()=>{p(!0);try{switch(t){case"memory-update":{const l=await(await fetch("/api/hooks/templates/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({templateId:"memory-auto-compress",scope:h})})).json();if(!l.success)throw new Error(l.error||"Failed to install template");break}case"danger-protection":{for(const a of v.selectedOptions){const l=Z.find(H=>H.id===a);if(!l)continue;const b=Se[l.templateId]||l.templateId,f=await(await fetch("/api/hooks/templates/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({templateId:b,scope:h})})).json();f.success||console.warn(`Failed to install template ${b}:`,f.error)}break}case"skill-context":{const a=y.mode==="auto"?{_templateId:"skill-context-auto",matcher:"",hooks:[{type:"command",command:"ccw hook keyword --stdin"}]}:{_templateId:"skill-context-keyword",matcher:"",hooks:[{type:"command",command:"ccw hook keyword --stdin"}]};await Ze(h,"UserPromptSubmit",a);break}}g.invalidateQueries({queryKey:["hooks"]}),R()}catch(a){console.error("Failed to create hook:",a)}finally{p(!1)}},se=()=>{const a=K[t].icon;return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3 pb-4 border-b",children:[e.jsx("div",{className:"p-3 rounded-lg bg-primary/10",children:e.jsx(a,{className:"w-6 h-6 text-primary"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:i({id:K[t].title})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:i({id:K[t].description})})]})]}),e.jsxs(T,{className:"p-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Y,{className:S("w-5 h-5",U.compatible?"text-green-500":"text-destructive")}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:i({id:"cliHooks.wizards.platform.detected"})}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[q(C)," (",Pt(Ct(C)),")"]})]}),e.jsx(N,{variant:U.compatible?"default":"destructive",children:U.compatible?i({id:"cliHooks.wizards.platform.compatible"}):i({id:"cliHooks.wizards.platform.incompatible"})})]}),!U.compatible&&U.issues.length>0&&e.jsxs("div",{className:"mt-3 flex items-start gap-2 p-3 bg-destructive/10 rounded-lg",children:[e.jsx(ye,{className:"w-4 h-4 text-destructive shrink-0 mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-destructive",children:i({id:"cliHooks.wizards.platform.compatibilityError"})}),e.jsx("ul",{className:"mt-1 space-y-1",children:U.issues.map((l,b)=>e.jsx("li",{className:"text-xs text-destructive/80",children:l},b))})]})]}),U.warnings.length>0&&e.jsxs("div",{className:"mt-3 flex items-start gap-2 p-3 bg-yellow-500/10 rounded-lg",children:[e.jsx(ye,{className:"w-4 h-4 text-yellow-600 shrink-0 mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-yellow-600",children:i({id:"cliHooks.wizards.platform.compatibilityWarning"})}),e.jsx("ul",{className:"mt-1 space-y-1",children:U.warnings.map((l,b)=>e.jsx("li",{className:"text-xs text-yellow-600/80",children:l},b))})]})]})]}),e.jsxs(T,{className:"p-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:i({id:"cliHooks.wizards.steps.triggerEvent"})}),e.jsx(N,{variant:"secondary",children:i({id:`cliHooks.trigger.${I.trigger}`})})]})]})},A=()=>{switch(t){case"memory-update":return ie();case"danger-protection":return Q();case"skill-context":return oe();default:return null}},V=()=>e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"text-center pb-4 border-b",children:[e.jsx(Y,{className:"w-12 h-12 text-green-500 mx-auto mb-3"}),e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:i({id:"cliHooks.wizards.steps.review.title"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:i({id:"cliHooks.wizards.steps.review.description"})})]}),e.jsxs(T,{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:i({id:"cliHooks.wizards.steps.review.hookType"})}),e.jsx("span",{className:"text-sm font-medium text-foreground",children:i({id:K[t].title})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:i({id:"cliHooks.wizards.steps.review.trigger"})}),e.jsx(N,{variant:"secondary",className:"text-xs",children:i({id:`cliHooks.trigger.${I.trigger}`})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:i({id:"cliHooks.wizards.steps.review.platform"})}),e.jsx("span",{className:"text-sm text-foreground",children:q(C)})]}),ae()]}),e.jsxs(T,{className:"p-4",children:[e.jsx("p",{className:"text-sm font-medium text-foreground mb-3",children:i({id:"cliHooks.wizards.steps.review.installTo"})}),e.jsxs("div",{className:"flex gap-4",children:[e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"radio",name:"wizardScope",value:"project",checked:h==="project",onChange:()=>P("project"),className:"accent-primary"}),e.jsx("span",{className:"text-sm text-foreground",children:i({id:"cliHooks.wizards.steps.review.scopeProject"})}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"(.claude/settings.json)"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"radio",name:"wizardScope",value:"global",checked:h==="global",onChange:()=>P("global"),className:"accent-primary"}),e.jsx("span",{className:"text-sm text-foreground",children:i({id:"cliHooks.wizards.steps.review.scopeGlobal"})}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"(~/.claude/settings.json)"})]})]})]}),e.jsxs(T,{className:"p-4",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:i({id:"cliHooks.wizards.steps.review.commandPreview"})}),e.jsx("pre",{className:"text-xs font-mono bg-muted p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:re()})]})]}),ie=()=>e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:i({id:"cliHooks.wizards.memoryUpdate.cliTool"})}),e.jsxs(ue,{value:c.tool,onValueChange:a=>E({...c,tool:a}),children:[e.jsx(ge,{className:"mt-1",children:e.jsx(pe,{})}),e.jsxs(he,{children:[e.jsx(W,{value:"gemini",children:"Gemini"}),e.jsx(W,{value:"qwen",children:"Qwen"}),e.jsx(W,{value:"codex",children:"Codex"}),e.jsx(W,{value:"opencode",children:"OpenCode"})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:i({id:"cliHooks.wizards.memoryUpdate.cliToolHelp"})})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:i({id:"cliHooks.wizards.memoryUpdate.threshold"})}),e.jsx(L,{type:"number",value:c.threshold,onChange:a=>E({...c,threshold:Math.max(1,Math.min(20,parseInt(a.target.value)||1))}),min:1,max:20,className:"mt-1"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:i({id:"cliHooks.wizards.memoryUpdate.thresholdHelp"})})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:i({id:"cliHooks.wizards.memoryUpdate.timeout"})}),e.jsx(L,{type:"number",value:c.timeout,onChange:a=>E({...c,timeout:Math.max(60,Math.min(1800,parseInt(a.target.value)||60))}),min:60,max:1800,step:60,className:"mt-1"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:i({id:"cliHooks.wizards.memoryUpdate.timeoutHelp"})})]})]}),Q=()=>{const a=l=>{ee(b=>({selectedOptions:b.selectedOptions.includes(l)?b.selectedOptions.filter(f=>f!==l):[...b.selectedOptions,l]}))};return e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:i({id:"cliHooks.wizards.dangerProtection.selectProtections"})}),Z.map(l=>e.jsxs("label",{className:S("flex items-start gap-3 p-3 rounded-lg border cursor-pointer transition-colors",v.selectedOptions.includes(l.id)?"border-primary bg-primary/5":"border-border hover:border-primary/50"),children:[e.jsx("input",{type:"checkbox",checked:v.selectedOptions.includes(l.id),onChange:()=>a(l.id),className:"mt-0.5 accent-primary"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:i({id:l.labelKey})}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i({id:l.descKey})})]})]},l.id))]})},oe=()=>{const a=(k==null?void 0:k.skills)??[],l=()=>{F(f=>({...f,skillConfigs:[...f.skillConfigs,{skill:"",keywords:""}]}))},b=f=>{F(H=>({...H,skillConfigs:H.skillConfigs.filter((o,u)=>u!==f)}))},M=(f,H,o)=>{F(u=>{const m=[...u.skillConfigs];return m[f]={...m[f],[H]:o},{...u,skillConfigs:m}})};return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:i({id:"cliHooks.wizards.skillContext.mode"})}),e.jsxs("div",{className:"flex gap-3 mt-2",children:[e.jsxs("label",{className:S("flex-1 flex items-center gap-2 p-3 rounded-lg border cursor-pointer transition-colors",y.mode==="keyword"?"border-primary bg-primary/5":"border-border"),children:[e.jsx("input",{type:"radio",name:"skillMode",value:"keyword",checked:y.mode==="keyword",onChange:()=>F(f=>({...f,mode:"keyword"})),className:"accent-primary"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:i({id:"cliHooks.wizards.skillContext.modeKeyword"})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:i({id:"cliHooks.wizards.skillContext.modeKeywordDesc"})})]})]}),e.jsxs("label",{className:S("flex-1 flex items-center gap-2 p-3 rounded-lg border cursor-pointer transition-colors",y.mode==="auto"?"border-primary bg-primary/5":"border-border"),children:[e.jsx("input",{type:"radio",name:"skillMode",value:"auto",checked:y.mode==="auto",onChange:()=>F(f=>({...f,mode:"auto"})),className:"accent-primary"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:i({id:"cliHooks.wizards.skillContext.modeAuto"})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:i({id:"cliHooks.wizards.skillContext.modeAutoDesc"})})]})]})]})]}),y.mode==="keyword"&&e.jsx(e.Fragment,{children:D?e.jsx("p",{className:"text-sm text-muted-foreground",children:i({id:"cliHooks.wizards.skillContext.loadingSkills"})}):e.jsxs("div",{className:"space-y-3",children:[y.skillConfigs.map((f,H)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(ue,{value:f.skill,onValueChange:o=>M(H,"skill",o),children:[e.jsx(ge,{className:"w-[160px]",children:e.jsx(pe,{placeholder:i({id:"cliHooks.wizards.skillContext.selectSkill"})})}),e.jsx(he,{children:a.map(o=>e.jsx(W,{value:o.name,children:o.name},o.name))})]}),e.jsx(L,{value:f.keywords,onChange:o=>M(H,"keywords",o.target.value),placeholder:i({id:"cliHooks.wizards.skillContext.keywordsPlaceholder"}),className:"flex-1"}),y.skillConfigs.length>1&&e.jsx(w,{variant:"ghost",size:"icon",onClick:()=>b(H),children:e.jsx(Ce,{className:"w-4 h-4"})})]},H)),e.jsxs(w,{variant:"outline",size:"sm",onClick:l,className:"w-full",children:[e.jsx(fe,{className:"w-4 h-4 mr-1"}),i({id:"cliHooks.wizards.skillContext.addPair"})]})]})}),y.mode==="auto"&&e.jsxs(T,{className:"p-4 bg-muted/30",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:i({id:"cliHooks.wizards.skillContext.autoDescription"})}),!D&&a.length>0&&e.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:a.map(f=>e.jsx(N,{variant:"secondary",className:"text-xs",children:f.name},f.name))})]})]})},ae=()=>{switch(t){case"memory-update":return e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"CLI Tool"}),e.jsx(N,{variant:"secondary",children:c.tool})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Threshold"}),e.jsxs("span",{children:[c.threshold," paths"]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Timeout"}),e.jsxs("span",{children:[c.timeout,"s"]})]})]});case"danger-protection":return e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[i({id:"cliHooks.wizards.dangerProtection.selectedProtections"}),":"]}),e.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:v.selectedOptions.map(a=>{const l=Z.find(b=>b.id===a);return l?e.jsx(N,{variant:"secondary",className:"text-xs",children:i({id:l.labelKey})},a):null})})]});case"skill-context":return e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:i({id:"cliHooks.wizards.skillContext.mode"})}),e.jsx(N,{variant:"secondary",children:y.mode==="auto"?i({id:"cliHooks.wizards.skillContext.modeAuto"}):i({id:"cliHooks.wizards.skillContext.modeKeyword"})})]}),y.mode==="keyword"&&e.jsxs("div",{children:[e.jsxs("span",{className:"text-muted-foreground",children:[i({id:"cliHooks.wizards.skillContext.keywordMappings"}),":"]}),e.jsx("div",{className:"mt-1 space-y-1",children:y.skillConfigs.filter(a=>a.skill&&a.keywords).map((a,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx(N,{variant:"outline",children:a.keywords}),e.jsx("span",{className:"text-muted-foreground",children:"->"}),e.jsx(N,{variant:"secondary",children:a.skill})]},l))})]})]});default:return null}},re=()=>{switch(t){case"memory-update":return"ccw hook template exec memory-auto-compress --stdin";case"danger-protection":{const a=v.selectedOptions.map(l=>Z.find(b=>b.id===l)).filter(Boolean).map(l=>`ccw hook template exec ${Se[l.templateId]||l.templateId} --stdin`);return a.length>0?a.join(`
7
7
  `):"# No protections selected"}case"skill-context":return"ccw hook keyword --stdin";default:return""}},ne=()=>e.jsxs(Ue,{className:"gap-2",children:[r>1&&e.jsxs(w,{variant:"outline",onClick:_,disabled:z,children:[e.jsx(Ve,{className:"w-4 h-4 mr-1"}),i({id:"cliHooks.wizards.navigation.previous"})]}),r<3?e.jsxs(w,{onClick:G,disabled:!U.compatible,children:[i({id:"cliHooks.wizards.navigation.next"}),e.jsx(Qe,{className:"w-4 h-4 ml-1"})]}):e.jsx(w,{onClick:te,disabled:z,children:i(z?{id:"cliHooks.wizards.navigation.creating"}:{id:"cliHooks.wizards.navigation.create"})})]}),le=()=>e.jsx("div",{className:"flex items-center justify-center gap-2 pb-4",children:[1,2,3].map(a=>e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:S("w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium",r===a?"bg-primary text-primary-foreground":r>a?"bg-green-500 text-white":"bg-muted text-muted-foreground"),children:r>a?e.jsx(Y,{className:"w-4 h-4"}):a}),a<3&&e.jsx("div",{className:S("w-12 h-0.5 mx-1",r>a?"bg-green-500":"bg-muted")})]},a))});return e.jsx(Pe,{open:s,onOpenChange:R,children:e.jsxs(He,{className:"sm:max-w-[600px]",children:[e.jsx(Te,{children:e.jsx(ze,{className:"flex items-center gap-2",children:i({id:"cliHooks.wizards.title"})})}),e.jsx("div",{className:"w-full bg-muted h-1 rounded-full my-4",children:e.jsx("div",{className:"bg-primary h-1 rounded-full transition-all duration-300",style:{width:`${r/3*100}%`}})}),le(),e.jsxs("div",{className:"min-h-[300px]",children:[r===1&&se(),r===2&&A(),r===3&&V()]}),ne()]})})}function zt(t){return["SessionStart","UserPromptSubmit","PreToolUse","PostToolUse","Stop","Notification","SubagentStart","SubagentStop","PreCompact","SessionEnd","PostToolUseFailure","PermissionRequest"].includes(t)}function Ut(t){return zt(t.trigger)?{name:t.name,description:t.description,enabled:t.enabled,trigger:t.trigger,matcher:t.matcher,command:t.command||t.script,scope:t.scope,index:t.index}:null}function Dt(t){return{SessionStart:t.filter(s=>s.trigger==="SessionStart"),UserPromptSubmit:t.filter(s=>s.trigger==="UserPromptSubmit"),PreToolUse:t.filter(s=>s.trigger==="PreToolUse"),PostToolUse:t.filter(s=>s.trigger==="PostToolUse"),Stop:t.filter(s=>s.trigger==="Stop"),Notification:t.filter(s=>s.trigger==="Notification"),SubagentStart:t.filter(s=>s.trigger==="SubagentStart"),SubagentStop:t.filter(s=>s.trigger==="SubagentStop"),PreCompact:t.filter(s=>s.trigger==="PreCompact"),SessionEnd:t.filter(s=>s.trigger==="SessionEnd"),PostToolUseFailure:t.filter(s=>s.trigger==="PostToolUseFailure"),PermissionRequest:t.filter(s=>s.trigger==="PermissionRequest")}}function Et(t){return{SessionStart:{total:t.SessionStart.length,enabled:t.SessionStart.filter(s=>s.enabled).length},UserPromptSubmit:{total:t.UserPromptSubmit.length,enabled:t.UserPromptSubmit.filter(s=>s.enabled).length},PreToolUse:{total:t.PreToolUse.length,enabled:t.PreToolUse.filter(s=>s.enabled).length},PostToolUse:{total:t.PostToolUse.length,enabled:t.PostToolUse.filter(s=>s.enabled).length},Stop:{total:t.Stop.length,enabled:t.Stop.filter(s=>s.enabled).length},Notification:{total:t.Notification.length,enabled:t.Notification.filter(s=>s.enabled).length},SubagentStart:{total:t.SubagentStart.length,enabled:t.SubagentStart.filter(s=>s.enabled).length},SubagentStop:{total:t.SubagentStop.length,enabled:t.SubagentStop.filter(s=>s.enabled).length},PreCompact:{total:t.PreCompact.length,enabled:t.PreCompact.filter(s=>s.enabled).length},SessionEnd:{total:t.SessionEnd.length,enabled:t.SessionEnd.filter(s=>s.enabled).length},PostToolUseFailure:{total:t.PostToolUseFailure.length,enabled:t.PostToolUseFailure.filter(s=>s.enabled).length},PermissionRequest:{total:t.PermissionRequest.length,enabled:t.PermissionRequest.filter(s=>s.enabled).length}}}function Kt(){const{formatMessage:t}=$(),[s,j]=x.useState(""),[i,g]=x.useState("all"),[r,n]=x.useState(!1),[C,d]=x.useState("create"),[h,P]=x.useState(),[z,p]=x.useState(!1),[k,D]=x.useState("memory-update"),[c,E]=x.useState(new Set),[v,ee]=x.useState(!1),[y,F]=x.useState(!1),{hooks:I,enabledCount:U,totalCount:G,isLoading:_,refetch:R}=xt(),{toggleHook:te}=ut(),{deleteHook:se}=gt(),A=x.useMemo(()=>{let o=I.map(Ut).filter(u=>u!==null);if(i!=="all"&&(o=o.filter(u=>u.trigger===i)),s.trim()){const u=s.toLowerCase();o=o.filter(m=>m.name.toLowerCase().includes(u)||m.description&&m.description.toLowerCase().includes(u)||m.trigger.toLowerCase().includes(u)||m.command&&m.command.toLowerCase().includes(u))}return o},[I,s,i]),V=x.useMemo(()=>Dt(A),[A]),ie=x.useMemo(()=>Et(V),[V]),Q=()=>{d("create"),P(void 0),n(!0)},oe=o=>{d("edit"),P(o),n(!0)},ae=async o=>{const u=A.find(m=>m.name===o);if(!u){console.error("Hook not found:",o);return}try{await se({name:u.name,scope:u.scope,trigger:u.trigger,index:u.index})}catch(m){console.error("Failed to delete hook:",m)}},re=async o=>{console.log("Save hook:",o),await R()},ne=o=>{E(u=>{const m=new Set(u);return m.has(o)?m.delete(o):m.add(o),m})},le=[{type:"memory-update",icon:Fe,label:t({id:"cliHooks.wizards.memoryUpdate.title"}),description:t({id:"cliHooks.wizards.memoryUpdate.shortDescription"})},{type:"danger-protection",icon:X,label:t({id:"cliHooks.wizards.dangerProtection.title"}),description:t({id:"cliHooks.wizards.dangerProtection.shortDescription"})},{type:"skill-context",icon:Ae,label:t({id:"cliHooks.wizards.skillContext.title"}),description:t({id:"cliHooks.wizards.skillContext.shortDescription"})}],a=o=>{D(o),p(!0)},l=x.useMemo(()=>je.filter(o=>I.some(u=>u.templateId===o.id)).map(o=>o.id),[I]),[b,M]=x.useState(null),f=async o=>{if(je.find(m=>m.id===o)){M(o);try{const m=await fetch("/api/hooks/templates/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({templateId:o,scope:"project"})});if(!m.ok)throw new Error(`Failed to install template: ${m.statusText}`);const O=await m.json();if(!O.success)throw new Error(O.error||"Unknown error");await R()}catch(m){console.error("Failed to install template:",m)}finally{M(null)}}},H=[{type:"all",icon:J,label:t({id:"common.all"})},{type:"SessionStart",icon:Ye,label:t({id:"cliHooks.trigger.SessionStart"})},{type:"UserPromptSubmit",icon:B,label:t({id:"cliHooks.trigger.UserPromptSubmit"})},{type:"PreToolUse",icon:De,label:t({id:"cliHooks.trigger.PreToolUse"})},{type:"PostToolUse",icon:Y,label:t({id:"cliHooks.trigger.PostToolUse"})},{type:"Stop",icon:pt,label:t({id:"cliHooks.trigger.Stop"})}];return e.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-bold text-foreground flex items-center gap-2",children:[e.jsx(J,{className:"w-6 h-6 text-primary"}),t({id:"cliHooks.title"})]}),e.jsx("p",{className:"text-muted-foreground mt-1",children:t({id:"cliHooks.description"})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(w,{variant:"outline",size:"sm",onClick:()=>R(),disabled:_,children:[e.jsx(Be,{className:S("w-4 h-4 mr-1",_&&"animate-spin")}),t({id:"common.actions.refresh"})]}),e.jsxs(w,{variant:"outline",size:"sm",onClick:Q,children:[e.jsx(fe,{className:"w-4 h-4 mr-1"}),t({id:"cliHooks.actions.add"})]}),e.jsxs(w,{size:"sm",onClick:()=>a("memory-update"),variant:"secondary",children:[e.jsx(ke,{className:"w-4 h-4 mr-1"}),t({id:"cliHooks.wizards.launch"})]})]})]}),e.jsx(T,{className:"p-4",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"relative flex-1 max-w-md",children:[e.jsx(Xe,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(L,{placeholder:t({id:"cliHooks.filters.searchPlaceholder"}),value:s,onChange:o=>j(o.target.value),className:"pl-9"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(N,{variant:"outline",className:"text-sm",children:t({id:"cliHooks.stats.total"},{count:G})}),e.jsx(N,{variant:"default",className:"text-sm",children:t({id:"cliHooks.stats.enabled"},{count:U})})]})]}),e.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:H.map(({type:o,icon:u,label:m})=>{const O=i===o,we=o==="all"?{enabled:U,total:G}:ie[o];return e.jsxs(w,{variant:O?"default":"outline",size:"sm",onClick:()=>g(o),className:"gap-2",children:[e.jsx(u,{className:"w-4 h-4"}),m,e.jsxs(N,{variant:O?"secondary":"outline",className:"ml-1",children:[we.enabled,"/",we.total]})]},o)})})]})}),A.length>0&&e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:A.map(o=>e.jsx(wt,{hook:o,isExpanded:c.has(o.name),onToggleExpand:()=>ne(o.name),onToggle:te,onEdit:oe,onDelete:ae},o.name))}),e.jsxs(T,{className:"overflow-hidden",children:[e.jsxs("div",{className:"p-4 cursor-pointer hover:bg-muted/50 transition-colors flex items-center justify-between border-b border-border",onClick:()=>ee(!v),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(B,{className:"w-5 h-5 text-primary"}),e.jsx("h2",{className:"text-base font-semibold text-foreground",children:t({id:"cliHooks.quickTemplates.title"})})]}),e.jsx(w,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:v?e.jsx(me,{className:"w-4 h-4"}):e.jsx(xe,{className:"w-4 h-4"})})]}),v&&e.jsx("div",{className:"p-6",children:e.jsx(St,{onInstallTemplate:f,installedTemplates:l,isLoading:!!b,installingTemplateId:b})})]}),e.jsxs(T,{className:"overflow-hidden",children:[e.jsxs("div",{className:"p-4 cursor-pointer hover:bg-muted/50 transition-colors flex items-center justify-between",onClick:()=>F(!y),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ke,{className:"w-5 h-5 text-primary"}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-semibold text-foreground",children:t({id:"cliHooks.wizards.sectionTitle"})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t({id:"cliHooks.wizards.sectionDescription"})})]})]}),e.jsx(w,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:y?e.jsx(me,{className:"w-4 h-4"}):e.jsx(xe,{className:"w-4 h-4"})})]}),y&&e.jsx("div",{className:"border-t border-border p-6",children:e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:le.map(({type:o,icon:u,label:m,description:O})=>e.jsx(T,{className:"p-4 cursor-pointer hover:bg-muted/50 transition-colors",onClick:()=>a(o),children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"p-2 rounded-lg bg-primary/10 shrink-0",children:e.jsx(u,{className:"w-5 h-5 text-primary"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"text-sm font-medium text-foreground mb-1",children:m}),e.jsx("p",{className:"text-xs text-muted-foreground",children:O})]})]})},o))})})]}),!_&&A.length===0&&e.jsxs(T,{className:"p-12 text-center",children:[e.jsx(J,{className:"w-16 h-16 mx-auto text-muted-foreground/30 mb-4"}),e.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:t({id:"cliHooks.empty.title"})}),e.jsx("p",{className:"text-muted-foreground mb-6",children:t({id:"cliHooks.empty.description"})}),e.jsxs(w,{onClick:Q,children:[e.jsx(fe,{className:"w-4 h-4 mr-1"}),t({id:"cliHooks.actions.addFirst"})]})]}),e.jsx(yt,{mode:C,hook:h,open:r,onClose:()=>n(!1),onSave:re}),e.jsx(Tt,{wizardType:k,open:z,onClose:()=>p(!1)})]})}export{Kt as HookManagerPage,Kt as default};
8
- //# sourceMappingURL=HookManagerPage-DizO_dCP.js.map
8
+ //# sourceMappingURL=HookManagerPage-Cfn2UEyy.js.map