@devflow-tools/devflow 0.17.8 → 0.18.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 (203) hide show
  1. package/LICENSE +21 -0
  2. package/acceptance-manifest.json +3 -3
  3. package/dist/cli.js +75 -75
  4. package/dist/dashboard/404.html +1 -1
  5. package/dist/dashboard/__next.__PAGE__.txt +22 -0
  6. package/dist/dashboard/__next._full.txt +17 -0
  7. package/dist/dashboard/__next._tree.txt +2 -0
  8. package/dist/dashboard/_next/static/chunks/136-c55134e877048a37.js +1 -0
  9. package/dist/dashboard/_next/static/chunks/240-8f45a6db4f75278b.js +1 -0
  10. package/dist/dashboard/_next/static/chunks/426-5d356f119312b4e9.js +1 -0
  11. package/dist/dashboard/_next/static/chunks/567-65014d15b90b623c.js +1 -0
  12. package/dist/dashboard/_next/static/chunks/6b3bb038-e03941413841e57b.js +2 -0
  13. package/dist/dashboard/_next/static/chunks/722-001c96b6723e043d.js +1 -0
  14. package/dist/dashboard/_next/static/chunks/73-0fe34a8ce87c82ea.js +1 -0
  15. package/dist/dashboard/_next/static/chunks/820-9606b69ff6f7f9b9.js +1 -0
  16. package/dist/dashboard/_next/static/chunks/87c73c54-5c63d5698583b654.js +1 -0
  17. package/dist/dashboard/_next/static/chunks/90-63c7687fddbb45ce.js +1 -0
  18. package/dist/dashboard/_next/static/chunks/914-7e538089692b7d1b.js +1 -0
  19. package/dist/dashboard/_next/static/chunks/968-13e9b4b491d5e8de.js +52 -0
  20. package/dist/dashboard/_next/static/chunks/993-01834e67bc353d44.js +1 -0
  21. package/dist/dashboard/_next/static/chunks/app/_global-error/page-d786ba6306178164.js +1 -0
  22. package/dist/dashboard/_next/static/chunks/app/_not-found/page-d0b590a9f2ad206d.js +1 -0
  23. package/dist/dashboard/_next/static/chunks/app/accuracy/page-72ef9620a52e345e.js +1 -0
  24. package/dist/dashboard/_next/static/chunks/app/benchmark/page-a6005345a1d9a286.js +1 -0
  25. package/dist/dashboard/_next/static/chunks/app/context/page-070c5ebfffb71f1b.js +1 -0
  26. package/dist/dashboard/_next/static/chunks/app/doctor/page-973e0f84ace610ac.js +1 -0
  27. package/dist/dashboard/_next/static/chunks/app/executions/page-52f9a045f91548cc.js +1 -0
  28. package/dist/dashboard/_next/static/chunks/app/graph/page-c3487fe2482e734e.js +1 -0
  29. package/dist/dashboard/_next/static/chunks/app/knowledge/page-e184866ed2e92ef1.js +1 -0
  30. package/dist/dashboard/_next/static/chunks/app/layout-a28c30513212e363.js +1 -0
  31. package/dist/dashboard/_next/static/chunks/app/memory/page-36e047153bedfce2.js +1 -0
  32. package/dist/dashboard/_next/static/chunks/app/page-1daa0024f1e5dd18.js +1 -0
  33. package/dist/dashboard/_next/static/chunks/app/replay/page-7a6293c77eafe8b4.js +1 -0
  34. package/dist/dashboard/_next/static/chunks/app/runs/[id]/page-7a92db57d7fb2265.js +1 -0
  35. package/dist/dashboard/_next/static/chunks/app/runs/page-36baf64267e36b28.js +1 -0
  36. package/dist/dashboard/_next/static/chunks/app/settings/page-90b4b80e939f76e3.js +1 -0
  37. package/dist/dashboard/_next/static/chunks/app/timeline/page-c1f1b6c081532456.js +1 -0
  38. package/dist/dashboard/_next/static/chunks/app/tool-metrics/page-1c5ddf6239cf1734.js +1 -0
  39. package/dist/dashboard/_next/static/chunks/app/workflows/page-e2ed74df546c3568.js +1 -0
  40. package/dist/dashboard/_next/static/chunks/framework-3b2aca1ee87fa7ee.js +1 -0
  41. package/dist/dashboard/_next/static/chunks/main-9bbdbe1dbba0ab29.js +5 -0
  42. package/dist/dashboard/_next/static/chunks/main-app-44f3d55a6e6befbb.js +1 -0
  43. package/dist/dashboard/_next/static/chunks/next/dist/client/components/builtin/app-error-d786ba6306178164.js +1 -0
  44. package/dist/dashboard/_next/static/chunks/next/dist/client/components/builtin/forbidden-d786ba6306178164.js +1 -0
  45. package/dist/dashboard/_next/static/chunks/next/dist/client/components/builtin/global-error-39f976c070691d89.js +1 -0
  46. package/dist/dashboard/_next/static/chunks/next/dist/client/components/builtin/not-found-d786ba6306178164.js +1 -0
  47. package/dist/dashboard/_next/static/chunks/next/dist/client/components/builtin/unauthorized-d786ba6306178164.js +1 -0
  48. package/dist/dashboard/_next/static/chunks/webpack-5f4649c40b052b9f.js +1 -0
  49. package/dist/dashboard/_next/static/css/6912a202a7d0c151.css +3 -0
  50. package/dist/dashboard/_next/static/css/e07f2bf4fa519943.css +31 -0
  51. package/dist/dashboard/_next/static/vYfa_ZByuhX4CBoOEYkDT/_buildManifest.js +1 -0
  52. package/dist/dashboard/_not-found/__next._full.txt +18 -0
  53. package/dist/dashboard/_not-found/__next._not-found.__PAGE__.txt +24 -0
  54. package/dist/dashboard/_not-found/__next._tree.txt +2 -0
  55. package/dist/dashboard/_not-found.html +1 -0
  56. package/dist/dashboard/_not-found.txt +18 -0
  57. package/dist/dashboard/accuracy/__next._full.txt +19 -0
  58. package/dist/dashboard/accuracy/__next._tree.txt +2 -0
  59. package/dist/dashboard/accuracy/__next.accuracy.__PAGE__.txt +25 -0
  60. package/dist/dashboard/accuracy.html +1 -1
  61. package/dist/dashboard/accuracy.txt +19 -7
  62. package/dist/dashboard/benchmark/__next._full.txt +19 -0
  63. package/dist/dashboard/benchmark/__next._tree.txt +2 -0
  64. package/dist/dashboard/benchmark/__next.benchmark.__PAGE__.txt +25 -0
  65. package/dist/dashboard/benchmark.html +1 -1
  66. package/dist/dashboard/benchmark.txt +19 -7
  67. package/dist/dashboard/context/__next._full.txt +19 -0
  68. package/dist/dashboard/context/__next._tree.txt +2 -0
  69. package/dist/dashboard/context/__next.context.__PAGE__.txt +25 -0
  70. package/dist/dashboard/context.html +1 -1
  71. package/dist/dashboard/context.txt +19 -7
  72. package/dist/dashboard/doctor/__next._full.txt +19 -0
  73. package/dist/dashboard/doctor/__next._tree.txt +2 -0
  74. package/dist/dashboard/doctor/__next.doctor.__PAGE__.txt +25 -0
  75. package/dist/dashboard/doctor.html +1 -1
  76. package/dist/dashboard/doctor.txt +19 -7
  77. package/dist/dashboard/executions/__next._full.txt +19 -0
  78. package/dist/dashboard/executions/__next._tree.txt +2 -0
  79. package/dist/dashboard/executions/__next.executions.__PAGE__.txt +25 -0
  80. package/dist/dashboard/executions.html +1 -1
  81. package/dist/dashboard/executions.txt +19 -7
  82. package/dist/dashboard/graph/__next._full.txt +20 -0
  83. package/dist/dashboard/graph/__next._tree.txt +3 -0
  84. package/dist/dashboard/graph/__next.graph.__PAGE__.txt +26 -0
  85. package/dist/dashboard/graph.html +1 -1
  86. package/dist/dashboard/graph.txt +20 -7
  87. package/dist/dashboard/index.html +1 -1
  88. package/dist/dashboard/index.txt +17 -7
  89. package/dist/dashboard/knowledge/__next._full.txt +19 -0
  90. package/dist/dashboard/knowledge/__next._tree.txt +2 -0
  91. package/dist/dashboard/knowledge/__next.knowledge.__PAGE__.txt +25 -0
  92. package/dist/dashboard/knowledge.html +1 -1
  93. package/dist/dashboard/knowledge.txt +19 -7
  94. package/dist/dashboard/memory/__next._full.txt +19 -0
  95. package/dist/dashboard/memory/__next._tree.txt +2 -0
  96. package/dist/dashboard/memory/__next.memory.__PAGE__.txt +25 -0
  97. package/dist/dashboard/memory.html +1 -1
  98. package/dist/dashboard/memory.txt +19 -7
  99. package/dist/dashboard/replay/__next._full.txt +19 -0
  100. package/dist/dashboard/replay/__next._tree.txt +2 -0
  101. package/dist/dashboard/replay/__next.replay.__PAGE__.txt +25 -0
  102. package/dist/dashboard/replay.html +1 -1
  103. package/dist/dashboard/replay.txt +19 -7
  104. package/dist/dashboard/runs/_/__next._full.txt +19 -0
  105. package/dist/dashboard/runs/_/__next._tree.txt +2 -0
  106. package/dist/dashboard/runs/_/__next.runs.$d$id.__PAGE__.txt +26 -0
  107. package/dist/dashboard/runs/_.html +1 -1
  108. package/dist/dashboard/runs/_.txt +19 -8
  109. package/dist/dashboard/runs/__next._full.txt +19 -0
  110. package/dist/dashboard/runs/__next._tree.txt +2 -0
  111. package/dist/dashboard/runs/__next.runs.__PAGE__.txt +25 -0
  112. package/dist/dashboard/runs.html +1 -1
  113. package/dist/dashboard/runs.txt +19 -7
  114. package/dist/dashboard/settings/__next._full.txt +19 -0
  115. package/dist/dashboard/settings/__next._tree.txt +2 -0
  116. package/dist/dashboard/settings/__next.settings.__PAGE__.txt +25 -0
  117. package/dist/dashboard/settings.html +1 -1
  118. package/dist/dashboard/settings.txt +19 -7
  119. package/dist/dashboard/timeline/__next._full.txt +19 -0
  120. package/dist/dashboard/timeline/__next._tree.txt +2 -0
  121. package/dist/dashboard/timeline/__next.timeline.__PAGE__.txt +25 -0
  122. package/dist/dashboard/timeline.html +1 -1
  123. package/dist/dashboard/timeline.txt +19 -7
  124. package/dist/dashboard/tool-metrics/__next._full.txt +19 -0
  125. package/dist/dashboard/tool-metrics/__next._tree.txt +2 -0
  126. package/dist/dashboard/tool-metrics/__next.tool-metrics.__PAGE__.txt +25 -0
  127. package/dist/dashboard/tool-metrics.html +1 -1
  128. package/dist/dashboard/tool-metrics.txt +19 -7
  129. package/dist/dashboard/workflows/__next._full.txt +19 -0
  130. package/dist/dashboard/workflows/__next._tree.txt +2 -0
  131. package/dist/dashboard/workflows/__next.workflows.__PAGE__.txt +25 -0
  132. package/dist/dashboard/workflows.html +1 -1
  133. package/dist/dashboard/workflows.txt +19 -7
  134. package/dist/hooks/enforcer-summary.js +3 -3
  135. package/dist/hooks/hook-client.js +3 -3
  136. package/dist/hooks/hook-daemon.js +27 -25
  137. package/dist/hooks/post-tool-use-failure.js +2 -2
  138. package/dist/hooks/post-tool-use.js +6 -6
  139. package/dist/hooks/pre-compact.js +2 -2
  140. package/dist/hooks/pre-tool-use.js +4 -4
  141. package/dist/hooks/server-bootstrap.js +22 -22
  142. package/dist/hooks/session-end.js +6 -6
  143. package/dist/hooks/stop.js +10 -10
  144. package/dist/hooks/user-prompt-submit.js +11 -9
  145. package/dist/plugin/.claude-plugin/plugin.json +1 -1
  146. package/dist/plugin/dist/command-registry.json +5 -5
  147. package/dist/plugin/dist/hooks/enforcer-summary.js +3 -3
  148. package/dist/plugin/dist/hooks/hook-client.js +3 -3
  149. package/dist/plugin/dist/hooks/hook-daemon.js +27 -25
  150. package/dist/plugin/dist/hooks/post-tool-use-failure.js +2 -2
  151. package/dist/plugin/dist/hooks/post-tool-use.js +6 -6
  152. package/dist/plugin/dist/hooks/pre-compact.js +2 -2
  153. package/dist/plugin/dist/hooks/pre-tool-use.js +4 -4
  154. package/dist/plugin/dist/hooks/server-bootstrap.js +22 -22
  155. package/dist/plugin/dist/hooks/session-end.js +6 -6
  156. package/dist/plugin/dist/hooks/stop.js +10 -10
  157. package/dist/plugin/dist/hooks/user-prompt-submit.js +11 -9
  158. package/dist/plugin/package.json +28 -19
  159. package/dist/scripts/audit-session-data.js +5 -5
  160. package/dist/scripts/semantic-reliability-maintenance.js +3 -3
  161. package/package.json +31 -22
  162. package/plugin-registry.json +57 -57
  163. package/dist/dashboard/_next/static/TCuEOFM92HCewQsicwfte/_buildManifest.js +0 -1
  164. package/dist/dashboard/_next/static/chunks/1dd3208c-f3e84932bdc53383.js +0 -1
  165. package/dist/dashboard/_next/static/chunks/221-893fab1a7d7d9317.js +0 -1
  166. package/dist/dashboard/_next/static/chunks/249-e04c1de6240fd78a.js +0 -1
  167. package/dist/dashboard/_next/static/chunks/343-09a7e255220705c5.js +0 -1
  168. package/dist/dashboard/_next/static/chunks/402-a2e4eb98bb6a524c.js +0 -1
  169. package/dist/dashboard/_next/static/chunks/429-39f42ebb1ac959d6.js +0 -1
  170. package/dist/dashboard/_next/static/chunks/458-75822399a849befa.js +0 -1
  171. package/dist/dashboard/_next/static/chunks/528-7d4fc14903647f1e.js +0 -2
  172. package/dist/dashboard/_next/static/chunks/568-50487ea5e93fe11f.js +0 -1
  173. package/dist/dashboard/_next/static/chunks/697-05cf55b6c667773f.js +0 -1
  174. package/dist/dashboard/_next/static/chunks/6b3bb038-34d5cf36bd0210d6.js +0 -1
  175. package/dist/dashboard/_next/static/chunks/736-db1a009357c222d2.js +0 -1
  176. package/dist/dashboard/_next/static/chunks/806-195d4d5cc6c28f6c.js +0 -1
  177. package/dist/dashboard/_next/static/chunks/app/_not-found/page-5252c260804ee1ce.js +0 -1
  178. package/dist/dashboard/_next/static/chunks/app/accuracy/page-7b4f3c728a0e880f.js +0 -1
  179. package/dist/dashboard/_next/static/chunks/app/benchmark/page-6c6d0acbcde4eb85.js +0 -1
  180. package/dist/dashboard/_next/static/chunks/app/context/page-1874ae1050524cb6.js +0 -1
  181. package/dist/dashboard/_next/static/chunks/app/doctor/page-d542f2ab8d6a1c59.js +0 -1
  182. package/dist/dashboard/_next/static/chunks/app/executions/page-9c836597c951abbb.js +0 -1
  183. package/dist/dashboard/_next/static/chunks/app/graph/page-f0e7e15288791e9c.js +0 -1
  184. package/dist/dashboard/_next/static/chunks/app/knowledge/page-86808abd0d47c026.js +0 -1
  185. package/dist/dashboard/_next/static/chunks/app/layout-4b78776412bd4fee.js +0 -1
  186. package/dist/dashboard/_next/static/chunks/app/memory/page-e05a76b696041097.js +0 -1
  187. package/dist/dashboard/_next/static/chunks/app/page-c3e980fb2621470c.js +0 -1
  188. package/dist/dashboard/_next/static/chunks/app/replay/page-a8a465ed885df0cf.js +0 -1
  189. package/dist/dashboard/_next/static/chunks/app/runs/[id]/page-cc1d5182707fca5b.js +0 -1
  190. package/dist/dashboard/_next/static/chunks/app/runs/page-bbf0a58abd70430c.js +0 -1
  191. package/dist/dashboard/_next/static/chunks/app/settings/page-9602ff45892e7910.js +0 -1
  192. package/dist/dashboard/_next/static/chunks/app/timeline/page-44541ee3e74cee0e.js +0 -1
  193. package/dist/dashboard/_next/static/chunks/app/tool-metrics/page-ece550f2f4328dfe.js +0 -1
  194. package/dist/dashboard/_next/static/chunks/app/workflows/page-228bcb475c39c1ec.js +0 -1
  195. package/dist/dashboard/_next/static/chunks/framework-58c3457e28c4602f.js +0 -1
  196. package/dist/dashboard/_next/static/chunks/main-3175faffdbfc3051.js +0 -1
  197. package/dist/dashboard/_next/static/chunks/main-app-202a5f91ead17fa7.js +0 -1
  198. package/dist/dashboard/_next/static/chunks/pages/_app-58c3f1a8a070bd35.js +0 -1
  199. package/dist/dashboard/_next/static/chunks/pages/_error-312a564ec7e2663f.js +0 -1
  200. package/dist/dashboard/_next/static/chunks/webpack-d6388c5dcd85b0c5.js +0 -1
  201. package/dist/dashboard/_next/static/css/322e14d06135256b.css +0 -31
  202. package/dist/dashboard/_next/static/css/7d4d1db5aa137b5a.css +0 -3
  203. /package/dist/dashboard/_next/static/{TCuEOFM92HCewQsicwfte → vYfa_ZByuhX4CBoOEYkDT}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="zh" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/7d4d1db5aa137b5a.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-d6388c5dcd85b0c5.js"/><script src="/_next/static/chunks/1dd3208c-f3e84932bdc53383.js" async=""></script><script src="/_next/static/chunks/528-7d4fc14903647f1e.js" async=""></script><script src="/_next/static/chunks/main-app-202a5f91ead17fa7.js" async=""></script><script src="/_next/static/chunks/736-db1a009357c222d2.js" async=""></script><script src="/_next/static/chunks/806-195d4d5cc6c28f6c.js" async=""></script><script src="/_next/static/chunks/697-05cf55b6c667773f.js" async=""></script><script src="/_next/static/chunks/429-39f42ebb1ac959d6.js" async=""></script><script src="/_next/static/chunks/app/workflows/page-228bcb475c39c1ec.js" async=""></script><script src="/_next/static/chunks/458-75822399a849befa.js" async=""></script><script src="/_next/static/chunks/249-e04c1de6240fd78a.js" async=""></script><script src="/_next/static/chunks/app/layout-4b78776412bd4fee.js" async=""></script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="h-dvh overflow-hidden"><div class="flex h-dvh items-center justify-center text-sm text-muted-foreground">Loading...</div><script src="/_next/static/chunks/webpack-d6388c5dcd85b0c5.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/7d4d1db5aa137b5a.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[11815,[],\"\"]\n4:I[72684,[\"736\",\"static/chunks/736-db1a009357c222d2.js\",\"806\",\"static/chunks/806-195d4d5cc6c28f6c.js\",\"697\",\"static/chunks/697-05cf55b6c667773f.js\",\"429\",\"static/chunks/429-39f42ebb1ac959d6.js\",\"467\",\"static/chunks/app/workflows/page-228bcb475c39c1ec.js\"],\"WorkflowRuns\"]\n5:I[55092,[],\"\"]\n6:I[82023,[],\"\"]\n7:I[68762,[\"736\",\"static/chunks/736-db1a009357c222d2.js\",\"806\",\"static/chunks/806-195d4d5cc6c28f6c.js\",\"697\",\"static/chunks/697-05cf55b6c667773f.js\",\"458\",\"static/chunks/458-75822399a849befa.js\",\"249\",\"static/chunks/249-e04c1de6240fd78a.js\",\"429\",\"static/chunks/429-39f42ebb1ac959d6.js\",\"185\",\"static/chunks/app/layout-4b78776412bd4fee.js\"],\"default\",1]\n9:I[91584,[],\"\"]\na:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"TCuEOFM92HCewQsicwfte\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"workflows\"],\"initialTree\":[\"\",{\"children\":[\"workflows\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"workflows\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[\"$\",\"$L4\",null,{}],null],null],null]},[null,[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"workflows\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/7d4d1db5aa137b5a.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L7\",null,{\"children\":[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],\"params\":{}}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$L8\"],\"globalErrorComponent\":\"$9\",\"missingSlots\":\"$Wa\"}]\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}]]\n3:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="zh" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/6912a202a7d0c151.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-5f4649c40b052b9f.js"/><script src="/_next/static/chunks/87c73c54-5c63d5698583b654.js" async=""></script><script src="/_next/static/chunks/968-13e9b4b491d5e8de.js" async=""></script><script src="/_next/static/chunks/main-app-44f3d55a6e6befbb.js" async=""></script><script src="/_next/static/chunks/820-9606b69ff6f7f9b9.js" async=""></script><script src="/_next/static/chunks/567-65014d15b90b623c.js" async=""></script><script src="/_next/static/chunks/993-01834e67bc353d44.js" async=""></script><script src="/_next/static/chunks/240-8f45a6db4f75278b.js" async=""></script><script src="/_next/static/chunks/722-001c96b6723e043d.js" async=""></script><script src="/_next/static/chunks/914-7e538089692b7d1b.js" async=""></script><script src="/_next/static/chunks/app/layout-a28c30513212e363.js" async=""></script><script src="/_next/static/chunks/app/workflows/page-e2ed74df546c3568.js" async=""></script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="h-dvh overflow-hidden"><div hidden=""><!--$--><!--/$--></div><div class="flex h-dvh items-center justify-center text-sm text-muted-foreground">Loading...</div><script src="/_next/static/chunks/webpack-5f4649c40b052b9f.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[589,[],\"ClientSegmentRoot\"]\n3:I[6248,[\"820\",\"static/chunks/820-9606b69ff6f7f9b9.js\",\"567\",\"static/chunks/567-65014d15b90b623c.js\",\"993\",\"static/chunks/993-01834e67bc353d44.js\",\"240\",\"static/chunks/240-8f45a6db4f75278b.js\",\"722\",\"static/chunks/722-001c96b6723e043d.js\",\"914\",\"static/chunks/914-7e538089692b7d1b.js\",\"177\",\"static/chunks/app/layout-a28c30513212e363.js\"],\"default\"]\n4:I[99630,[],\"\"]\n5:I[1380,[],\"\"]\n7:I[39173,[\"820\",\"static/chunks/820-9606b69ff6f7f9b9.js\",\"567\",\"static/chunks/567-65014d15b90b623c.js\",\"993\",\"static/chunks/993-01834e67bc353d44.js\",\"914\",\"static/chunks/914-7e538089692b7d1b.js\",\"143\",\"static/chunks/app/workflows/page-e2ed74df546c3568.js\"],\"WorkflowRuns\"]\n8:I[30887,[],\"OutletBoundary\"]\n9:\"$Sreact.suspense\"\nc:I[30887,[],\"ViewportBoundary\"]\ne:I[30887,[],\"MetadataBoundary\"]\n10:I[15718,[],\"default\",1]\n:HL[\"/_next/static/css/6912a202a7d0c151.css\",\"style\"]\nb:X\n0:{\"P\":null,\"c\":[\"\",\"workflows\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"workflows\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/6912a202a7d0c151.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"$L2\",null,{\"Component\":\"$3\",\"slots\":{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]},\"serverProvidedParams\":{\"params\":{},\"promises\":[\"$@6\"]}}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L7\",null,{}],null,[\"$\",\"$L8\",null,{\"children\":[\"$\",\"$9\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@a\"}]}]]}],{},null,false,null]},null,false,\"$b\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$Lc\",null,{\"children\":\"$Ld\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Le\",null,{\"children\":[\"$\",\"$9\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lf\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$10\",[]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"vYfa_ZByuhX4CBoOEYkDT\"}\nb:C\n6:\"$0:f:0:1:0:props:children:1:props:serverProvidedParams:params\"\nd:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\na:null\nf:[]\n"])</script></body></html>
@@ -1,7 +1,19 @@
1
- 2:I[72684,["736","static/chunks/736-db1a009357c222d2.js","806","static/chunks/806-195d4d5cc6c28f6c.js","697","static/chunks/697-05cf55b6c667773f.js","429","static/chunks/429-39f42ebb1ac959d6.js","467","static/chunks/app/workflows/page-228bcb475c39c1ec.js"],"WorkflowRuns"]
2
- 3:I[55092,[],""]
3
- 4:I[82023,[],""]
4
- 5:I[68762,["736","static/chunks/736-db1a009357c222d2.js","806","static/chunks/806-195d4d5cc6c28f6c.js","697","static/chunks/697-05cf55b6c667773f.js","458","static/chunks/458-75822399a849befa.js","249","static/chunks/249-e04c1de6240fd78a.js","429","static/chunks/429-39f42ebb1ac959d6.js","185","static/chunks/app/layout-4b78776412bd4fee.js"],"default",1]
5
- 0:["TCuEOFM92HCewQsicwfte",[[["",{"children":["workflows",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["workflows",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{}],null],null],null]},[null,["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","workflows","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/7d4d1db5aa137b5a.css","precedence":"next","crossOrigin":"$undefined"}]],["$","$L5",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}],"params":{}}]],null],null],["$L6",null]]]]
6
- 6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}]]
7
- 1:null
1
+ 1:"$Sreact.fragment"
2
+ 2:I[589,[],"ClientSegmentRoot"]
3
+ 3:I[6248,["820","static/chunks/820-9606b69ff6f7f9b9.js","567","static/chunks/567-65014d15b90b623c.js","993","static/chunks/993-01834e67bc353d44.js","240","static/chunks/240-8f45a6db4f75278b.js","722","static/chunks/722-001c96b6723e043d.js","914","static/chunks/914-7e538089692b7d1b.js","177","static/chunks/app/layout-a28c30513212e363.js"],"default"]
4
+ 4:I[99630,[],""]
5
+ 5:I[1380,[],""]
6
+ 7:I[39173,["820","static/chunks/820-9606b69ff6f7f9b9.js","567","static/chunks/567-65014d15b90b623c.js","993","static/chunks/993-01834e67bc353d44.js","914","static/chunks/914-7e538089692b7d1b.js","143","static/chunks/app/workflows/page-e2ed74df546c3568.js"],"WorkflowRuns"]
7
+ 8:I[30887,[],"OutletBoundary"]
8
+ 9:"$Sreact.suspense"
9
+ c:I[30887,[],"ViewportBoundary"]
10
+ e:I[30887,[],"MetadataBoundary"]
11
+ 10:I[15718,[],"default",1]
12
+ :HL["/_next/static/css/6912a202a7d0c151.css","style"]
13
+ b:X
14
+ 0:{"P":null,"c":["","workflows"],"q":"","i":false,"f":[[["",{"children":["workflows",{"children":["__PAGE__",{},"$undefined","$undefined",4608]},"$undefined","$undefined",4608]},"$undefined","$undefined",4624],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/6912a202a7d0c151.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","$L2",null,{"Component":"$3","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@6"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L7",null,{}],null,["$","$L8",null,{"children":["$","$9",null,{"name":"Next.MetadataOutlet","children":"$@a"}]}]]}],{},null,false,null]},null,false,"$b"]},null,false,null],["$","$1","h",{"children":[null,["$","$Lc",null,{"children":"$Ld"}],["$","div",null,{"hidden":true,"children":["$","$Le",null,{"children":["$","$9",null,{"name":"Next.Metadata","children":"$Lf"}]}]}],null]}],false]],"m":"$undefined","G":["$10",[]],"S":true,"h":null,"r":"$undefined","s":"$undefined","a":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"vYfa_ZByuhX4CBoOEYkDT"}
15
+ b:C
16
+ 6:"$0:f:0:1:0:props:children:1:props:serverProvidedParams:params"
17
+ d:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
18
+ a:null
19
+ f:[]
@@ -1,6 +1,6 @@
1
- import {existsSync}from'node:fs';import {homedir}from'node:os';import {resolve,join}from'node:path';import {fileURLToPath}from'node:url';async function m(n=homedir()){let a=process.env.DEVFLOW_STATE_DIR??join(n,".devflow","global"),r=join(a,"devflow.db");if(!existsSync(r))return {gateCount:4,ruleCount:null,source:"fallback"};let e;try{let{DatabaseSync:u}=await import('node:sqlite');e=new u(r,{readOnly:!0});let t=e.prepare(`
1
+ import {existsSync}from'node:fs';import {homedir}from'node:os';import {resolve,join}from'node:path';import {fileURLToPath}from'node:url';import {getDevFlowStateRoot}from'@devflow-tools/sdk';async function f(n=homedir()){let a=join(getDevFlowStateRoot({homeDir:n}),"global"),r=join(a,"devflow.db");if(!existsSync(r))return {gateCount:4,ruleCount:null,source:"fallback"};let e;try{let{DatabaseSync:u}=await import('node:sqlite');e=new u(r,{readOnly:!0});let t=e.prepare(`
2
2
  SELECT COUNT(*) AS rule_count, COUNT(DISTINCT gate) AS gate_count
3
3
  FROM devflow_rules
4
4
  WHERE enabled = 1
5
- `).get();return {gateCount:Number(t?.gate_count??0),ruleCount:Number(t?.rule_count??0),source:"database"}}catch{return {gateCount:4,ruleCount:null,source:"fallback"}}finally{e?.close();}}process.argv[1]&&fileURLToPath(import.meta.url)===resolve(process.argv[1])&&process.stdout.write(`${JSON.stringify(await m())}
6
- `);export{m as readEnforcerSummary};
5
+ `).get();return {gateCount:Number(t?.gate_count??0),ruleCount:Number(t?.rule_count??0),source:"database"}}catch{return {gateCount:4,ruleCount:null,source:"fallback"}}finally{e?.close();}}process.argv[1]&&fileURLToPath(import.meta.url)===resolve(process.argv[1])&&process.stdout.write(`${JSON.stringify(await f())}
6
+ `);export{f as readEnforcerSummary};
@@ -1,6 +1,6 @@
1
- import {createConnection}from'node:net';import {getDaemonSocketPath}from'@devflow-tools/sdk';import {mkdirSync,appendFileSync}from'node:fs';import {homedir}from'node:os';import {join,dirname}from'node:path';import {openGlobalDevFlowDatabase}from'@devflow-tools/database';import {createHash}from'node:crypto';function b(e,t,n){try{let o=openGlobalDevFlowDatabase();try{o.insertEvent({kind:e,timestamp:Date.now(),duration:n,success:t.success!==!1,metadata:t});}finally{o.close();}}catch{}}var S=["4-Gate enforcement","memory prefetch cache","daemon-shared hook state"];function m(e){let t=N(e.input)??e.requestType;if(b("hook_daemon_request",{success:e.success,projectRoot:e.projectRoot,requestType:e.requestType,tool:t,attempts:e.attempts},e.durationMs),e.success)return;let n=Date.now(),o=v(e.input);try{let r=openGlobalDevFlowDatabase(void 0,{busyTimeoutMs:250});try{r.insertHookFallback({id:`hook-fallback:${createHash("sha256").update(`${e.projectRoot}\0${o.sessionId??""}\0${o.toolUseId??""}\0${e.requestType}\0${n}`).digest("hex").slice(0,24)}`,projectRoot:e.projectRoot,sessionId:o.sessionId,toolUseId:o.toolUseId,requestType:e.requestType,tool:t,reason:e.reason??"unknown",durationMs:e.durationMs,attempts:e.attempts,createdAt:n});}finally{r.close();}}catch{}try{let r=join(homedir(),".devflow","logs","hook-fallback",`${new Date(n).toISOString().slice(0,10)}.log`);mkdirSync(dirname(r),{recursive:!0,mode:448}),appendFileSync(r,`${JSON.stringify({ts:n,tool:t,requestType:e.requestType,projectRoot:e.projectRoot,reason:`daemon-${e.reason??"unknown"}`,durationMs:e.durationMs,attempts:e.attempts,bypassCountLost:!0,disabledFeatures:S})}
2
- `,{mode:384});}catch{}}function v(e){try{let t=JSON.parse(e);return {sessionId:typeof t.session_id=="string"?t.session_id:void 0,toolUseId:typeof t.tool_use_id=="string"?t.tool_use_id:void 0}}catch{return {}}}function N(e){try{let t=JSON.parse(e);return typeof t.tool_name=="string"&&t.tool_name?t.tool_name:null}catch{return null}}var d=process.env.CLAUDE_PROJECT_DIR||process.cwd(),q=getDaemonSocketPath(d),u=process.argv[2],h=process.argv[3],p=Number(process.env.DEVFLOW_HOOK_CLIENT_TIMEOUT_MS),F=Number.isFinite(p)&&p>0?p:1e3,f=Number(process.env.DEVFLOW_HOOK_CLIENT_RETRY_DELAY_MS),P=Number.isFinite(f)&&f>=0?f:100,g=2*1024*1024,y=u==="memory-snapshot"?2:1;async function L(){let e=h!==void 0?H(h):u==="memory-snapshot"?{input:"",truncated:false}:await j(),{input:t,truncated:n}=e,o=Date.now(),r="unknown";for(let a=0;a<y;a+=1){let s=await B(t,n);if(s.response!==null){if(x(s.response)){r="protocol";break}return m({projectRoot:d,requestType:u,input:t,durationMs:Date.now()-o,success:true,attempts:a+1}),process.stdout.write(`${s.response}
3
- `),0}r=s.reason??"unknown",a<y-1&&await G(P);}return process.env.DEVFLOW_HOOK_CLIENT_SUPPRESS_FALLBACK_LOG!=="1"&&m({projectRoot:d,requestType:u,input:t,durationMs:Date.now()-o,success:false,attempts:y,reason:r}),1}function x(e){try{let t=JSON.parse(e);return !!(t&&typeof t=="object"&&!Array.isArray(t)&&typeof t.error=="string")}catch{return true}}function B(e,t){return new Promise(n=>{let o=createConnection(q),r=false,a="",s=(c,l)=>{r||(r=true,clearTimeout(i),o.destroy(),n({response:c,reason:l}));},i=setTimeout(()=>s(null,"timeout"),F);o.setEncoding("utf8"),o.on("connect",()=>{o.write(`${JSON.stringify({type:"hello",rootPath:d})}
1
+ import {createConnection}from'node:net';import {getDaemonSocketPath,getDevFlowStateRoot}from'@devflow-tools/sdk';import {mkdirSync,appendFileSync}from'node:fs';import {join,dirname}from'node:path';import {openGlobalDevFlowDatabase}from'@devflow-tools/database';import {createHash}from'node:crypto';function b(e,t,n){try{let o=openGlobalDevFlowDatabase();try{o.insertEvent({kind:e,timestamp:Date.now(),duration:n,success:t.success!==!1,metadata:t});}finally{o.close();}}catch{}}var I=["4-Gate enforcement","memory prefetch cache","daemon-shared hook state"];function p(e){let t=N(e.input)??e.requestType;if(b("hook_daemon_request",{success:e.success,projectRoot:e.projectRoot,requestType:e.requestType,tool:t,attempts:e.attempts},e.durationMs),e.success)return;let n=Date.now(),o=v(e.input);try{let r=openGlobalDevFlowDatabase(void 0,{busyTimeoutMs:250});try{r.insertHookFallback({id:`hook-fallback:${createHash("sha256").update(`${e.projectRoot}\0${o.sessionId??""}\0${o.toolUseId??""}\0${e.requestType}\0${n}`).digest("hex").slice(0,24)}`,projectRoot:e.projectRoot,sessionId:o.sessionId,toolUseId:o.toolUseId,requestType:e.requestType,tool:t,reason:e.reason??"unknown",durationMs:e.durationMs,attempts:e.attempts,createdAt:n});}finally{r.close();}}catch{}try{let r=join(getDevFlowStateRoot(),"logs","hook-fallback",`${new Date(n).toISOString().slice(0,10)}.log`);mkdirSync(dirname(r),{recursive:!0,mode:448}),appendFileSync(r,`${JSON.stringify({ts:n,tool:t,requestType:e.requestType,projectRoot:e.projectRoot,reason:`daemon-${e.reason??"unknown"}`,durationMs:e.durationMs,attempts:e.attempts,bypassCountLost:!0,disabledFeatures:I})}
2
+ `,{mode:384});}catch{}}function v(e){try{let t=JSON.parse(e);return {sessionId:typeof t.session_id=="string"?t.session_id:void 0,toolUseId:typeof t.tool_use_id=="string"?t.tool_use_id:void 0}}catch{return {}}}function N(e){try{let t=JSON.parse(e);return typeof t.tool_name=="string"&&t.tool_name?t.tool_name:null}catch{return null}}var d=process.env.CLAUDE_PROJECT_DIR||process.cwd(),q=getDaemonSocketPath(d),u=process.argv[2],h=process.argv[3],m=Number(process.env.DEVFLOW_HOOK_CLIENT_TIMEOUT_MS),F=Number.isFinite(m)&&m>0?m:1e3,f=Number(process.env.DEVFLOW_HOOK_CLIENT_RETRY_DELAY_MS),P=Number.isFinite(f)&&f>=0?f:100,g=2*1024*1024,y=u==="memory-snapshot"?2:1;async function L(){let e=h!==void 0?H(h):u==="memory-snapshot"?{input:"",truncated:false}:await j(),{input:t,truncated:n}=e,o=Date.now(),r="unknown";for(let a=0;a<y;a+=1){let s=await B(t,n);if(s.response!==null){if(x(s.response)){r="protocol";break}return p({projectRoot:d,requestType:u,input:t,durationMs:Date.now()-o,success:true,attempts:a+1}),process.stdout.write(`${s.response}
3
+ `),0}r=s.reason??"unknown",a<y-1&&await G(P);}return process.env.DEVFLOW_HOOK_CLIENT_SUPPRESS_FALLBACK_LOG!=="1"&&p({projectRoot:d,requestType:u,input:t,durationMs:Date.now()-o,success:false,attempts:y,reason:r}),1}function x(e){try{let t=JSON.parse(e);return !!(t&&typeof t=="object"&&!Array.isArray(t)&&typeof t.error=="string")}catch{return true}}function B(e,t){return new Promise(n=>{let o=createConnection(q),r=false,a="",s=(c,l)=>{r||(r=true,clearTimeout(i),o.destroy(),n({response:c,reason:l}));},i=setTimeout(()=>s(null,"timeout"),F);o.setEncoding("utf8"),o.on("connect",()=>{o.write(`${JSON.stringify({type:"hello",rootPath:d})}
4
4
  `);let c=$(e,t);if(!c){s(null,"protocol");return}o.write(`${JSON.stringify(c)}
5
5
  `);}),o.on("data",c=>{a+=c;let l=a.indexOf(`
6
6
  `);if(l<0)return;let _=a.slice(0,l).trim();s(_||null);}),o.on("error",()=>s(null,"unreachable")),o.on("close",()=>s(null,"unreachable"));})}function $(e,t){let n=t?{truncated:true}:{};return u==="stop"?{type:"stop",input:e,...n}:u==="memory-snapshot"?{type:"memory-snapshot"}:["session-start","session-end","post-tool-use","post-tool-use-failure","pre-tool-use","user-prompt-submit","pre-compact"].includes(u)?{type:u,input:e,...n}:null}function j(){return new Promise(e=>{let t=[],n=0,o=false;process.stdin.on("data",r=>{let a=Buffer.isBuffer(r)?r:Buffer.from(r),s=g-n;if(s>0){let i=a.subarray(0,s);t.push(i),n+=i.length;}a.length>s&&(o=true);}),process.stdin.on("end",()=>e({input:Buffer.concat(t).toString("utf8"),truncated:o})),process.stdin.on("error",()=>e({input:"",truncated:false}));})}function H(e){let t=Buffer.from(e);return t.length<=g?{input:e,truncated:false}:{input:t.subarray(0,g).toString("utf8"),truncated:true}}function G(e){return new Promise(t=>setTimeout(t,e))}L().then(e=>process.exit(e)).catch(()=>process.exit(1));