@witty-ai/skill-insight 0.3.0-beta โ†’ 0.5.0-beta

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 (412) hide show
  1. package/.env.example +51 -6
  2. package/.next/standalone/.next/BUILD_ID +1 -1
  3. package/.next/standalone/.next/app-path-routes-manifest.json +2 -0
  4. package/.next/standalone/.next/build-manifest.json +2 -2
  5. package/.next/standalone/.next/prerender-manifest.json +3 -3
  6. package/.next/standalone/.next/routes-manifest.json +12 -0
  7. package/.next/standalone/.next/server/app/_global-error.html +2 -2
  8. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  12. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  14. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  15. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  17. package/.next/standalone/.next/server/app/_not-found.rsc +4 -4
  18. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
  19. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  20. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  21. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  22. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  23. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  24. package/.next/standalone/.next/server/app/api/auth/apikey/route.js +2 -2
  25. package/.next/standalone/.next/server/app/api/auth/apikey/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/auth/organization/route/app-paths-manifest.json +3 -0
  27. package/.next/standalone/.next/server/app/api/auth/organization/route/build-manifest.json +11 -0
  28. package/.next/standalone/.next/server/app/api/auth/organization/route/server-reference-manifest.json +4 -0
  29. package/.next/standalone/.next/server/app/api/auth/organization/route.js +7 -0
  30. package/.next/standalone/.next/server/app/api/auth/organization/route.js.map +5 -0
  31. package/.next/standalone/.next/server/app/api/auth/organization/route.js.nft.json +1 -0
  32. package/.next/standalone/.next/server/app/api/auth/organization/route_client-reference-manifest.js +2 -0
  33. package/.next/standalone/.next/server/app/api/config/create/route.js +5 -5
  34. package/.next/standalone/.next/server/app/api/config/create/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/config/route.js +5 -4
  36. package/.next/standalone/.next/server/app/api/config/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/config/status/route.js +2 -2
  38. package/.next/standalone/.next/server/app/api/config/status/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/data/route.js +5 -4
  40. package/.next/standalone/.next/server/app/api/data/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/api/executions/[executionId]/analyze-match/route.js +4 -4
  42. package/.next/standalone/.next/server/app/api/executions/[executionId]/analyze-match/route.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/api/guide/route/app-paths-manifest.json +3 -0
  44. package/.next/standalone/.next/server/app/api/guide/route/build-manifest.json +11 -0
  45. package/.next/standalone/.next/server/app/api/guide/route/server-reference-manifest.json +4 -0
  46. package/.next/standalone/.next/server/app/api/guide/route.js +7 -0
  47. package/.next/standalone/.next/server/app/api/guide/route.js.map +5 -0
  48. package/.next/standalone/.next/server/app/api/guide/route.js.nft.json +1 -0
  49. package/.next/standalone/.next/server/app/api/guide/route_client-reference-manifest.js +2 -0
  50. package/.next/standalone/.next/server/app/api/otel/v1/logs/route.js +5 -4
  51. package/.next/standalone/.next/server/app/api/otel/v1/logs/route.js.nft.json +1 -1
  52. package/.next/standalone/.next/server/app/api/otel/v1/traces/route.js +5 -4
  53. package/.next/standalone/.next/server/app/api/otel/v1/traces/route.js.nft.json +1 -1
  54. package/.next/standalone/.next/server/app/api/proxy/[taskId]/[...path]/route.js +3 -3
  55. package/.next/standalone/.next/server/app/api/proxy/[taskId]/[...path]/route.js.nft.json +1 -1
  56. package/.next/standalone/.next/server/app/api/proxy/[taskId]/end/route.js +5 -4
  57. package/.next/standalone/.next/server/app/api/proxy/[taskId]/end/route.js.nft.json +1 -1
  58. package/.next/standalone/.next/server/app/api/proxy/[taskId]/start/route.js +2 -2
  59. package/.next/standalone/.next/server/app/api/proxy/[taskId]/start/route.js.nft.json +1 -1
  60. package/.next/standalone/.next/server/app/api/rejudge/route.js +5 -4
  61. package/.next/standalone/.next/server/app/api/rejudge/route.js.nft.json +1 -1
  62. package/.next/standalone/.next/server/app/api/session/route.js +5 -5
  63. package/.next/standalone/.next/server/app/api/session/route.js.nft.json +1 -1
  64. package/.next/standalone/.next/server/app/api/settings/route.js +2 -2
  65. package/.next/standalone/.next/server/app/api/settings/route.js.nft.json +1 -1
  66. package/.next/standalone/.next/server/app/api/settings/test/route.js +2 -2
  67. package/.next/standalone/.next/server/app/api/settings/test/route.js.nft.json +1 -1
  68. package/.next/standalone/.next/server/app/api/skills/[id]/activate/route.js +2 -2
  69. package/.next/standalone/.next/server/app/api/skills/[id]/activate/route.js.nft.json +1 -1
  70. package/.next/standalone/.next/server/app/api/skills/[id]/toggle/route.js +2 -2
  71. package/.next/standalone/.next/server/app/api/skills/[id]/toggle/route.js.nft.json +1 -1
  72. package/.next/standalone/.next/server/app/api/skills/[id]/versions/[version]/download/route.js +3 -3
  73. package/.next/standalone/.next/server/app/api/skills/[id]/versions/[version]/download/route.js.nft.json +1 -1
  74. package/.next/standalone/.next/server/app/api/skills/[id]/versions/[version]/parse-flow/route.js +4 -4
  75. package/.next/standalone/.next/server/app/api/skills/[id]/versions/[version]/parse-flow/route.js.nft.json +1 -1
  76. package/.next/standalone/.next/server/app/api/skills/[id]/versions/[version]/route.js +2 -2
  77. package/.next/standalone/.next/server/app/api/skills/[id]/versions/[version]/route.js.nft.json +1 -1
  78. package/.next/standalone/.next/server/app/api/skills/[id]/versions/route.js +2 -2
  79. package/.next/standalone/.next/server/app/api/skills/[id]/versions/route.js.nft.json +1 -1
  80. package/.next/standalone/.next/server/app/api/skills/automation/import/route.js +2 -2
  81. package/.next/standalone/.next/server/app/api/skills/automation/import/route.js.nft.json +1 -1
  82. package/.next/standalone/.next/server/app/api/skills/automation/push/route.js +2 -2
  83. package/.next/standalone/.next/server/app/api/skills/automation/push/route.js.nft.json +1 -1
  84. package/.next/standalone/.next/server/app/api/skills/by-name/route.js +2 -2
  85. package/.next/standalone/.next/server/app/api/skills/by-name/route.js.nft.json +1 -1
  86. package/.next/standalone/.next/server/app/api/skills/logs/route.js +5 -4
  87. package/.next/standalone/.next/server/app/api/skills/logs/route.js.nft.json +1 -1
  88. package/.next/standalone/.next/server/app/api/skills/route.js +2 -2
  89. package/.next/standalone/.next/server/app/api/skills/route.js.nft.json +1 -1
  90. package/.next/standalone/.next/server/app/api/skills/upload/route.js +2 -2
  91. package/.next/standalone/.next/server/app/api/skills/upload/route.js.nft.json +1 -1
  92. package/.next/standalone/.next/server/app/api/sync/manifest/route.js +2 -2
  93. package/.next/standalone/.next/server/app/api/sync/manifest/route.js.nft.json +1 -1
  94. package/.next/standalone/.next/server/app/api/sync/opencode/route.js +2 -2
  95. package/.next/standalone/.next/server/app/api/sync/opencode/route.js.nft.json +1 -1
  96. package/.next/standalone/.next/server/app/api/upload/route.js +5 -3
  97. package/.next/standalone/.next/server/app/api/upload/route.js.nft.json +1 -1
  98. package/.next/standalone/.next/server/app/details/page/react-loadable-manifest.json +3 -3
  99. package/.next/standalone/.next/server/app/details/page.js.nft.json +1 -1
  100. package/.next/standalone/.next/server/app/details/page_client-reference-manifest.js +1 -1
  101. package/.next/standalone/.next/server/app/details.html +1 -1
  102. package/.next/standalone/.next/server/app/details.rsc +5 -5
  103. package/.next/standalone/.next/server/app/details.segments/_full.segment.rsc +5 -5
  104. package/.next/standalone/.next/server/app/details.segments/_head.segment.rsc +1 -1
  105. package/.next/standalone/.next/server/app/details.segments/_index.segment.rsc +3 -3
  106. package/.next/standalone/.next/server/app/details.segments/_tree.segment.rsc +2 -2
  107. package/.next/standalone/.next/server/app/details.segments/details/__PAGE__.segment.rsc +2 -2
  108. package/.next/standalone/.next/server/app/details.segments/details.segment.rsc +1 -1
  109. package/.next/standalone/.next/server/app/index.html +1 -1
  110. package/.next/standalone/.next/server/app/index.rsc +5 -5
  111. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  112. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +5 -5
  113. package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  114. package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +3 -3
  115. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  116. package/.next/standalone/.next/server/app/login/page.js.nft.json +1 -1
  117. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  118. package/.next/standalone/.next/server/app/login.html +1 -1
  119. package/.next/standalone/.next/server/app/login.rsc +5 -5
  120. package/.next/standalone/.next/server/app/login.segments/_full.segment.rsc +5 -5
  121. package/.next/standalone/.next/server/app/login.segments/_head.segment.rsc +1 -1
  122. package/.next/standalone/.next/server/app/login.segments/_index.segment.rsc +3 -3
  123. package/.next/standalone/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  124. package/.next/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  125. package/.next/standalone/.next/server/app/login.segments/login.segment.rsc +1 -1
  126. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  127. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  128. package/.next/standalone/.next/server/app/skills/page.js.nft.json +1 -1
  129. package/.next/standalone/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  130. package/.next/standalone/.next/server/app/skills.html +1 -1
  131. package/.next/standalone/.next/server/app/skills.rsc +5 -5
  132. package/.next/standalone/.next/server/app/skills.segments/_full.segment.rsc +5 -5
  133. package/.next/standalone/.next/server/app/skills.segments/_head.segment.rsc +1 -1
  134. package/.next/standalone/.next/server/app/skills.segments/_index.segment.rsc +3 -3
  135. package/.next/standalone/.next/server/app/skills.segments/_tree.segment.rsc +2 -2
  136. package/.next/standalone/.next/server/app/skills.segments/skills/__PAGE__.segment.rsc +2 -2
  137. package/.next/standalone/.next/server/app/skills.segments/skills.segment.rsc +1 -1
  138. package/.next/standalone/.next/server/app-paths-manifest.json +2 -0
  139. package/.next/standalone/.next/server/chunks/[root-of-the-server]__02ddba88._.js +3 -0
  140. package/.next/standalone/.next/server/chunks/[root-of-the-server]__05e510f4._.js +3 -0
  141. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0a140a5a._.js +122 -0
  142. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1013b265._.js +3 -0
  143. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1c95bcde._.js +3 -0
  144. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1ce5e3b8._.js +3 -0
  145. package/.next/standalone/.next/server/chunks/[root-of-the-server]__4a6d443b._.js +3 -0
  146. package/.next/standalone/.next/server/chunks/[root-of-the-server]__53775b48._.js +3 -0
  147. package/.next/standalone/.next/server/chunks/[root-of-the-server]__5444db55._.js +3 -0
  148. package/.next/standalone/.next/server/chunks/[root-of-the-server]__591248f3._.js +3 -0
  149. package/.next/standalone/.next/server/chunks/[root-of-the-server]__5d8178f6._.js +3 -0
  150. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6923eecf._.js +3 -0
  151. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6d8053e2._.js +3 -0
  152. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6fc12878._.js +3 -0
  153. package/.next/standalone/.next/server/chunks/[root-of-the-server]__73ce6d21._.js +3 -0
  154. package/.next/standalone/.next/server/chunks/[root-of-the-server]__863cf6de._.js +3 -0
  155. package/.next/standalone/.next/server/chunks/[root-of-the-server]__98b3de5e._.js +3 -0
  156. package/.next/standalone/.next/server/chunks/[root-of-the-server]__9d551ea2._.js +3 -0
  157. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a4d3d791._.js +3 -0
  158. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__c6c98b22._.js โ†’ [root-of-the-server]__aa5c8858._.js} +3 -3
  159. package/.next/standalone/.next/server/chunks/[root-of-the-server]__b11acc79._.js +3 -0
  160. package/.next/standalone/.next/server/chunks/[root-of-the-server]__b835ea7f._.js +3 -0
  161. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ba01f286._.js +3 -0
  162. package/.next/standalone/.next/server/chunks/[root-of-the-server]__bd91659b._.js +3 -0
  163. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c200214a._.js +3 -0
  164. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d7fab946._.js +3 -0
  165. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d8c1808b._.js +3 -0
  166. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d9b9fecc._.js +3 -0
  167. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e280561d._.js +3 -0
  168. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e2f0baee._.js +3 -0
  169. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e550423c._.js +3 -0
  170. package/.next/standalone/.next/server/chunks/[root-of-the-server]__fc05579d._.js +3 -0
  171. package/.next/standalone/.next/server/chunks/_33c0c729._.js +1 -1
  172. package/.next/standalone/.next/server/chunks/_41a98bd8._.js +3 -0
  173. package/.next/standalone/.next/server/chunks/_c48f7c66._.js +1 -1
  174. package/.next/standalone/.next/server/chunks/_c82df3e0._.js +3 -3
  175. package/.next/standalone/.next/server/chunks/_cd3d20ca._.js +1 -1
  176. package/.next/standalone/.next/server/chunks/_fa49adfa._.js +3 -3
  177. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_auth_organization_route_actions_f58710b7.js +3 -0
  178. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_guide_route_actions_6c188449.js +3 -0
  179. package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_c33286ed.js +71 -110
  180. package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_f42faeee.js +1 -400
  181. package/.next/standalone/.next/server/chunks/src_497d2ad2._.js +22 -22
  182. package/.next/standalone/.next/server/chunks/src_c8971a2d._.js +1 -1
  183. package/.next/standalone/.next/server/chunks/src_lib_12408140._.js +3 -0
  184. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__5d576168._.js โ†’ [root-of-the-server]__40353d98._.js} +1 -1
  185. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__89851212._.js โ†’ [root-of-the-server]__480fcd92._.js} +1 -1
  186. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__72a7f3ed._.js โ†’ [root-of-the-server]__48f8fbcb._.js} +1 -1
  187. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__438a2c90._.js โ†’ [root-of-the-server]__49921b2a._.js} +1 -1
  188. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__51073007._.js +1 -1
  189. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__c9e3c893._.js โ†’ [root-of-the-server]__593be3d6._.js} +1 -1
  190. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__ca101543._.js โ†’ [root-of-the-server]__5e9ff641._.js} +1 -1
  191. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__90641614._.js โ†’ [root-of-the-server]__66cc6ff2._.js} +1 -1
  192. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__37bfda90._.js โ†’ [root-of-the-server]__9889bdc8._.js} +1 -1
  193. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__42ba97b6._.js โ†’ [root-of-the-server]__9905ca7a._.js} +2 -2
  194. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__9ab7cc4a._.js +3 -0
  195. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__7bb97139._.js โ†’ [root-of-the-server]__9d6b7d48._.js} +1 -1
  196. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__6b8b9bb9._.js โ†’ [root-of-the-server]__b8edc8c6._.js} +1 -1
  197. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1dfe61f8._.js โ†’ [root-of-the-server]__d691ecb0._.js} +1 -1
  198. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__d0917d6e._.js โ†’ [root-of-the-server]__e5ddfd15._.js} +1 -1
  199. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__e5e3a145._.js โ†’ [root-of-the-server]__f72f330e._.js} +1 -1
  200. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__99ab66d7._.js โ†’ [root-of-the-server]__f843e085._.js} +1 -1
  201. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__8a82ef12._.js โ†’ [root-of-the-server]__fd69d276._.js} +2 -2
  202. package/.next/standalone/.next/server/chunks/ssr/{_7688d7cd._.js โ†’ _049876f0._.js} +2 -2
  203. package/.next/standalone/.next/server/chunks/ssr/{_981cd263._.js โ†’ _09546b95._.js} +2 -2
  204. package/.next/standalone/.next/server/chunks/ssr/_8f5379ab._.js +1 -1
  205. package/.next/standalone/.next/server/chunks/ssr/{node_modules_cf1f3d2c._.js โ†’ _b121f1ae._.js} +2 -2
  206. package/.next/standalone/.next/server/chunks/ssr/_c8c8c083._.js +18 -42
  207. package/.next/standalone/.next/server/chunks/ssr/_fd46f439._.js +3 -0
  208. package/.next/standalone/.next/server/chunks/ssr/{node_modules_a4a1f3c3._.js โ†’ node_modules_039c6a11._.js} +1 -1
  209. package/.next/standalone/.next/server/chunks/ssr/{node_modules_a7a82280._.js โ†’ node_modules_0d3530cd._.js} +2 -2
  210. package/.next/standalone/.next/server/chunks/ssr/{node_modules_0c2939c3._.js โ†’ node_modules_0e883565._.js} +1 -1
  211. package/.next/standalone/.next/server/chunks/ssr/{node_modules_8d9e56b7._.js โ†’ node_modules_11dbf165._.js} +2 -2
  212. package/.next/standalone/.next/server/chunks/ssr/{node_modules_76d6c533._.js โ†’ node_modules_2041c122._.js} +2 -2
  213. package/.next/standalone/.next/server/chunks/ssr/{node_modules_b007145b._.js โ†’ node_modules_235267bb._.js} +1 -1
  214. package/.next/standalone/.next/server/chunks/ssr/{node_modules_11d81adf._.js โ†’ node_modules_25dfb0ba._.js} +2 -2
  215. package/.next/standalone/.next/server/chunks/ssr/{node_modules_205ce1c9._.js โ†’ node_modules_2b12c669._.js} +2 -2
  216. package/.next/standalone/.next/server/chunks/ssr/{node_modules_cc19e85c._.js โ†’ node_modules_32996880._.js} +2 -2
  217. package/.next/standalone/.next/server/chunks/ssr/{node_modules_62621b34._.js โ†’ node_modules_35885fe9._.js} +2 -2
  218. package/.next/standalone/.next/server/chunks/ssr/{node_modules_ee43cfd6._.js โ†’ node_modules_38a95353._.js} +2 -2
  219. package/.next/standalone/.next/server/chunks/ssr/{node_modules_f596a14c._.js โ†’ node_modules_3a317c51._.js} +1 -1
  220. package/.next/standalone/.next/server/chunks/ssr/{node_modules_776b68cf._.js โ†’ node_modules_44966ab2._.js} +1 -1
  221. package/.next/standalone/.next/server/chunks/ssr/node_modules_514c148b._.js +3 -0
  222. package/.next/standalone/.next/server/chunks/ssr/{node_modules_e272ac31._.js โ†’ node_modules_53af751a._.js} +2 -2
  223. package/.next/standalone/.next/server/chunks/ssr/{node_modules_23d38260._.js โ†’ node_modules_5f539891._.js} +1 -1
  224. package/.next/standalone/.next/server/chunks/ssr/{node_modules_86b6ffa4._.js โ†’ node_modules_60402210._.js} +1 -1
  225. package/.next/standalone/.next/server/chunks/ssr/{node_modules_3769cd60._.js โ†’ node_modules_60eccfb6._.js} +1 -1
  226. package/.next/standalone/.next/server/chunks/ssr/{node_modules_fdf808cf._.js โ†’ node_modules_632c098c._.js} +1 -1
  227. package/.next/standalone/.next/server/chunks/ssr/{node_modules_60cf7de2._.js โ†’ node_modules_6c42f75c._.js} +1 -1
  228. package/.next/standalone/.next/server/chunks/ssr/{node_modules_2f215d2b._.js โ†’ node_modules_6fbe276d._.js} +2 -2
  229. package/.next/standalone/.next/server/chunks/ssr/{node_modules_4cd41088._.js โ†’ node_modules_740e9d59._.js} +2 -2
  230. package/.next/standalone/.next/server/chunks/ssr/{node_modules_d0af4cb2._.js โ†’ node_modules_7a3d551c._.js} +1 -1
  231. package/.next/standalone/.next/server/chunks/ssr/{node_modules_4f41f172._.js โ†’ node_modules_861cb9cf._.js} +2 -2
  232. package/.next/standalone/.next/server/chunks/ssr/{node_modules_db8af6e3._.js โ†’ node_modules_8a892761._.js} +1 -1
  233. package/.next/standalone/.next/server/chunks/ssr/{node_modules_28fef057._.js โ†’ node_modules_a5a4946e._.js} +1 -1
  234. package/.next/standalone/.next/server/chunks/ssr/{node_modules_3d9afa91._.js โ†’ node_modules_a712c937._.js} +1 -1
  235. package/.next/standalone/.next/server/chunks/ssr/{node_modules_330b9e3c._.js โ†’ node_modules_a8c276dd._.js} +2 -2
  236. package/.next/standalone/.next/server/chunks/ssr/{node_modules_abf4f826._.js โ†’ node_modules_acc9d529._.js} +1 -1
  237. package/.next/standalone/.next/server/chunks/ssr/{node_modules_39a3e684._.js โ†’ node_modules_ad07ab39._.js} +1 -1
  238. package/.next/standalone/.next/server/chunks/ssr/{node_modules_1d88c7cc._.js โ†’ node_modules_b38efa22._.js} +1 -1
  239. package/.next/standalone/.next/server/chunks/ssr/{node_modules_8633bac6._.js โ†’ node_modules_b4ef036d._.js} +2 -2
  240. package/.next/standalone/.next/server/chunks/ssr/{node_modules_abc9e5a6._.js โ†’ node_modules_b6bad701._.js} +2 -2
  241. package/.next/standalone/.next/server/chunks/ssr/{node_modules_c90fa812._.js โ†’ node_modules_b9810024._.js} +1 -1
  242. package/.next/standalone/.next/server/chunks/ssr/{node_modules_f56b62b0._.js โ†’ node_modules_b9ad808d._.js} +1 -1
  243. package/.next/standalone/.next/server/chunks/ssr/{node_modules_7287189a._.js โ†’ node_modules_bc287d9f._.js} +1 -1
  244. package/.next/standalone/.next/server/chunks/ssr/{node_modules_5ab83f0a._.js โ†’ node_modules_c411d7df._.js} +2 -2
  245. package/.next/standalone/.next/server/chunks/ssr/{node_modules_c98dd942._.js โ†’ node_modules_c6469d93._.js} +1 -1
  246. package/.next/standalone/.next/server/chunks/ssr/{node_modules_6391b0cd._.js โ†’ node_modules_c704e802._.js} +1 -1
  247. package/.next/standalone/.next/server/chunks/ssr/{node_modules_df113a74._.js โ†’ node_modules_cda46cfc._.js} +2 -2
  248. package/.next/standalone/.next/server/chunks/ssr/{node_modules_aa6da06c._.js โ†’ node_modules_cf171d0c._.js} +1 -1
  249. package/.next/standalone/.next/server/chunks/ssr/{node_modules_be61cdef._.js โ†’ node_modules_e8927fc2._.js} +1 -1
  250. package/.next/standalone/.next/server/chunks/ssr/node_modules_katex_dist_katex_mjs_d037b3b1._.js +1 -1
  251. package/.next/standalone/.next/server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-7R4GIKGN_mjs_e5dda8cc._.js +1 -1
  252. package/.next/standalone/.next/server/chunks/ssr/src_66a70595._.js +1 -1
  253. package/.next/standalone/.next/server/chunks/ssr/src_app_login_page_tsx_72f58654._.js +1 -1
  254. package/.next/standalone/.next/server/pages/404.html +1 -1
  255. package/.next/standalone/.next/server/pages/500.html +2 -2
  256. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  257. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  258. package/.next/standalone/.next/static/chunks/{d60f0b3e2f4689ac.js โ†’ 01eddf501c574a44.js} +1 -1
  259. package/.next/{static/chunks/ec0de430276c8209.js โ†’ standalone/.next/static/chunks/078d76156083f265.js} +1 -1
  260. package/.next/standalone/.next/static/chunks/{6a17b619eed04f07.js โ†’ 07c9f28a269c701a.js} +2 -2
  261. package/.next/standalone/.next/static/chunks/1e782a49beaf489c.js +1 -0
  262. package/.next/{static/chunks/55723b38de737547.js โ†’ standalone/.next/static/chunks/21105f8885631d60.js} +1 -1
  263. package/.next/standalone/.next/static/chunks/4071dbec4cf7e72e.js +109 -0
  264. package/.next/{static/chunks/052f178ab7519d8d.js โ†’ standalone/.next/static/chunks/5432ce4a494bc74d.js} +2 -2
  265. package/.next/standalone/.next/static/chunks/59cd76b8d89e776a.js +1 -0
  266. package/.next/standalone/.next/static/chunks/67bd1a5de2195779.js +1 -0
  267. package/.next/standalone/.next/static/chunks/6baf949fafec6be3.js +1 -0
  268. package/.next/standalone/.next/static/chunks/737b8cff3c6a4e30.js +1 -0
  269. package/.next/standalone/.next/static/chunks/7e35f4cf2e266022.js +1 -0
  270. package/.next/standalone/.next/static/chunks/a87b5e84254095a5.js +1 -0
  271. package/.next/standalone/.next/static/chunks/b43afe7d924243d9.js +2 -0
  272. package/.next/standalone/.next/static/chunks/c6bd2818656b1f20.css +1 -0
  273. package/.next/{static/chunks/559e55a53f22f5d1.js โ†’ standalone/.next/static/chunks/c875bd2ff662b46f.js} +1 -1
  274. package/.next/{static/chunks/6d12c79948c7e0ac.js โ†’ standalone/.next/static/chunks/dc59a07a8f327b40.js} +1 -1
  275. package/.next/standalone/.next/static/chunks/e09d9ee16fe90255.js +1 -0
  276. package/.next/standalone/.next/static/chunks/{20337e5244416041.js โ†’ e20b02ee30c11a26.js} +1 -1
  277. package/.next/standalone/.next/static/chunks/ff6357067630b168.js +1 -0
  278. package/.next/standalone/LICENSE +1 -1
  279. package/.next/standalone/bin/cli.js +1 -1
  280. package/.next/standalone/features/feature-skill-used-jump-link/design/2026-03-18-skill-used-jump-link-design.md +126 -0
  281. package/.next/standalone/features/feature-skill-used-jump-link/feature.json +32 -0
  282. package/.next/standalone/features/feature-skill-used-jump-link/issue.md +32 -0
  283. package/.next/standalone/features/feature-skill-used-jump-link/plans/2026-03-18-skill-used-jump-link.md +528 -0
  284. package/.next/standalone/next.config.ts +14 -2
  285. package/.next/standalone/node_modules/.prisma/client/edge.js +23 -5
  286. package/.next/standalone/node_modules/.prisma/client/index-browser.js +20 -2
  287. package/.next/standalone/node_modules/.prisma/client/index.js +23 -5
  288. package/.next/standalone/node_modules/.prisma/client/package.json +1 -1
  289. package/.next/standalone/node_modules/.prisma/client/schema.prisma +19 -2
  290. package/.next/standalone/node_modules/.prisma/client/wasm.js +20 -2
  291. package/.next/standalone/node_modules/@img/colour/color.cjs +11 -9
  292. package/.next/standalone/node_modules/@img/colour/package.json +21 -8
  293. package/.next/standalone/package.json +1 -1
  294. package/.next/standalone/prisma/schema.prisma +19 -2
  295. package/.next/standalone/scripts/activate_telemetry.sh +24 -24
  296. package/.next/standalone/scripts/claude_watcher_client.ts +9 -7
  297. package/.next/standalone/scripts/init_opengauss.py +15 -0
  298. package/.next/standalone/scripts/install.js +68 -35
  299. package/.next/standalone/scripts/logs.js +1 -1
  300. package/.next/standalone/scripts/openclaw_watcher_client.ts +9 -7
  301. package/.next/standalone/scripts/opencode_plugin.ts +278 -46
  302. package/.next/standalone/scripts/postinstall.js +80 -38
  303. package/.next/standalone/scripts/restart.js +1 -1
  304. package/.next/standalone/scripts/start.js +84 -60
  305. package/.next/standalone/scripts/status.js +1 -1
  306. package/.next/standalone/scripts/stop.js +38 -14
  307. package/.next/standalone/scripts/sync_skills.js +5 -5
  308. package/.next/standalone/scripts/utils.js +91 -23
  309. package/.next/standalone/tests/setup_skill_optimizer.sh +118 -0
  310. package/.next/static/chunks/{d60f0b3e2f4689ac.js โ†’ 01eddf501c574a44.js} +1 -1
  311. package/.next/{standalone/.next/static/chunks/ec0de430276c8209.js โ†’ static/chunks/078d76156083f265.js} +1 -1
  312. package/.next/static/chunks/{6a17b619eed04f07.js โ†’ 07c9f28a269c701a.js} +2 -2
  313. package/.next/static/chunks/1e782a49beaf489c.js +1 -0
  314. package/.next/{standalone/.next/static/chunks/55723b38de737547.js โ†’ static/chunks/21105f8885631d60.js} +1 -1
  315. package/.next/static/chunks/4071dbec4cf7e72e.js +109 -0
  316. package/.next/{standalone/.next/static/chunks/052f178ab7519d8d.js โ†’ static/chunks/5432ce4a494bc74d.js} +2 -2
  317. package/.next/static/chunks/59cd76b8d89e776a.js +1 -0
  318. package/.next/static/chunks/67bd1a5de2195779.js +1 -0
  319. package/.next/static/chunks/6baf949fafec6be3.js +1 -0
  320. package/.next/static/chunks/737b8cff3c6a4e30.js +1 -0
  321. package/.next/static/chunks/7e35f4cf2e266022.js +1 -0
  322. package/.next/static/chunks/a87b5e84254095a5.js +1 -0
  323. package/.next/static/chunks/b43afe7d924243d9.js +2 -0
  324. package/.next/static/chunks/c6bd2818656b1f20.css +1 -0
  325. package/.next/{standalone/.next/static/chunks/559e55a53f22f5d1.js โ†’ static/chunks/c875bd2ff662b46f.js} +1 -1
  326. package/.next/{standalone/.next/static/chunks/6d12c79948c7e0ac.js โ†’ static/chunks/dc59a07a8f327b40.js} +1 -1
  327. package/.next/static/chunks/e09d9ee16fe90255.js +1 -0
  328. package/.next/static/chunks/{20337e5244416041.js โ†’ e20b02ee30c11a26.js} +1 -1
  329. package/.next/static/chunks/ff6357067630b168.js +1 -0
  330. package/LICENSE +1 -1
  331. package/README.md +7 -6
  332. package/bin/cli.js +1 -1
  333. package/package.json +1 -1
  334. package/prisma/schema.prisma +19 -2
  335. package/scripts/activate_telemetry.sh +24 -24
  336. package/scripts/claude_watcher_client.ts +9 -7
  337. package/scripts/init_opengauss.py +15 -0
  338. package/scripts/install.js +68 -35
  339. package/scripts/logs.js +1 -1
  340. package/scripts/openclaw_watcher_client.ts +9 -7
  341. package/scripts/opencode_plugin.ts +278 -46
  342. package/scripts/postinstall.js +80 -38
  343. package/scripts/restart.js +1 -1
  344. package/scripts/start.js +84 -60
  345. package/scripts/status.js +1 -1
  346. package/scripts/stop.js +38 -14
  347. package/scripts/sync_skills.js +5 -5
  348. package/scripts/utils.js +91 -23
  349. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1306e4eb._.js +0 -3
  350. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1809fb2b._.js +0 -3
  351. package/.next/standalone/.next/server/chunks/[root-of-the-server]__19594bdd._.js +0 -3
  352. package/.next/standalone/.next/server/chunks/[root-of-the-server]__19db3d34._.js +0 -3
  353. package/.next/standalone/.next/server/chunks/[root-of-the-server]__2b2e7f49._.js +0 -3
  354. package/.next/standalone/.next/server/chunks/[root-of-the-server]__3c02de9b._.js +0 -3
  355. package/.next/standalone/.next/server/chunks/[root-of-the-server]__3f3ad12b._.js +0 -3
  356. package/.next/standalone/.next/server/chunks/[root-of-the-server]__4c1ad182._.js +0 -3
  357. package/.next/standalone/.next/server/chunks/[root-of-the-server]__4dce0fe6._.js +0 -3
  358. package/.next/standalone/.next/server/chunks/[root-of-the-server]__582cdc68._.js +0 -3
  359. package/.next/standalone/.next/server/chunks/[root-of-the-server]__625e84f3._.js +0 -3
  360. package/.next/standalone/.next/server/chunks/[root-of-the-server]__68b5a8b3._.js +0 -3
  361. package/.next/standalone/.next/server/chunks/[root-of-the-server]__704b8533._.js +0 -3
  362. package/.next/standalone/.next/server/chunks/[root-of-the-server]__78ea20f2._.js +0 -3
  363. package/.next/standalone/.next/server/chunks/[root-of-the-server]__7f754db9._.js +0 -3
  364. package/.next/standalone/.next/server/chunks/[root-of-the-server]__824c33e1._.js +0 -3
  365. package/.next/standalone/.next/server/chunks/[root-of-the-server]__92449e6d._.js +0 -3
  366. package/.next/standalone/.next/server/chunks/[root-of-the-server]__9465727f._.js +0 -3
  367. package/.next/standalone/.next/server/chunks/[root-of-the-server]__9c3018b5._.js +0 -3
  368. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a12846e0._.js +0 -3
  369. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a637116a._.js +0 -3
  370. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a8f83ee4._.js +0 -3
  371. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a8ffc1b1._.js +0 -3
  372. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a9cb205c._.js +0 -122
  373. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ab7048b0._.js +0 -3
  374. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ac25e4ae._.js +0 -3
  375. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ae5ac9cd._.js +0 -3
  376. package/.next/standalone/.next/server/chunks/[root-of-the-server]__bebf4267._.js +0 -3
  377. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c5ae3ebd._.js +0 -3
  378. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ebdafae4._.js +0 -3
  379. package/.next/standalone/.next/server/chunks/[root-of-the-server]__eefd5f5b._.js +0 -3
  380. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__082c32a2._.js +0 -3
  381. package/.next/standalone/.next/server/chunks/ssr/_b7889f85._.js +0 -3
  382. package/.next/standalone/.next/server/chunks/ssr/node_modules_0b762d3e._.js +0 -3
  383. package/.next/standalone/.next/static/chunks/024c9acb4aa490c8.js +0 -1
  384. package/.next/standalone/.next/static/chunks/104f2c1fb93033c0.js +0 -1
  385. package/.next/standalone/.next/static/chunks/222a937a6c859036.js +0 -1
  386. package/.next/standalone/.next/static/chunks/2e1b2125198a02c4.js +0 -1
  387. package/.next/standalone/.next/static/chunks/32b26ff1bbd034fd.js +0 -1
  388. package/.next/standalone/.next/static/chunks/428e6cf64b115e9d.css +0 -1
  389. package/.next/standalone/.next/static/chunks/62e251619a96dc26.js +0 -1
  390. package/.next/standalone/.next/static/chunks/65c652f23d2d68bd.js +0 -133
  391. package/.next/standalone/.next/static/chunks/876e2d70185fd438.js +0 -1
  392. package/.next/standalone/.next/static/chunks/c647b2e4532050e0.js +0 -1
  393. package/.next/standalone/.next/static/chunks/d2e574310159a10b.js +0 -1
  394. package/.next/standalone/.next/static/chunks/dab1749712763979.js +0 -2
  395. package/.next/static/chunks/024c9acb4aa490c8.js +0 -1
  396. package/.next/static/chunks/104f2c1fb93033c0.js +0 -1
  397. package/.next/static/chunks/222a937a6c859036.js +0 -1
  398. package/.next/static/chunks/2e1b2125198a02c4.js +0 -1
  399. package/.next/static/chunks/32b26ff1bbd034fd.js +0 -1
  400. package/.next/static/chunks/428e6cf64b115e9d.css +0 -1
  401. package/.next/static/chunks/62e251619a96dc26.js +0 -1
  402. package/.next/static/chunks/65c652f23d2d68bd.js +0 -133
  403. package/.next/static/chunks/876e2d70185fd438.js +0 -1
  404. package/.next/static/chunks/c647b2e4532050e0.js +0 -1
  405. package/.next/static/chunks/d2e574310159a10b.js +0 -1
  406. package/.next/static/chunks/dab1749712763979.js +0 -2
  407. /package/.next/standalone/.next/static/{Zt2VD1Py2IilfVNJL-9Wm โ†’ H581Rok68JtPV4bAVVH3l}/_buildManifest.js +0 -0
  408. /package/.next/standalone/.next/static/{Zt2VD1Py2IilfVNJL-9Wm โ†’ H581Rok68JtPV4bAVVH3l}/_clientMiddlewareManifest.json +0 -0
  409. /package/.next/standalone/.next/static/{Zt2VD1Py2IilfVNJL-9Wm โ†’ H581Rok68JtPV4bAVVH3l}/_ssgManifest.js +0 -0
  410. /package/.next/static/{Zt2VD1Py2IilfVNJL-9Wm โ†’ H581Rok68JtPV4bAVVH3l}/_buildManifest.js +0 -0
  411. /package/.next/static/{Zt2VD1Py2IilfVNJL-9Wm โ†’ H581Rok68JtPV4bAVVH3l}/_clientMiddlewareManifest.json +0 -0
  412. /package/.next/static/{Zt2VD1Py2IilfVNJL-9Wm โ†’ H581Rok68JtPV4bAVVH3l}/_ssgManifest.js +0 -0
@@ -1,402 +1,3 @@
1
- module.exports=[26984,e=>{"use strict";var t=e.i(47909),a=e.i(74017),n=e.i(60476),i=e.i(59756),o=e.i(61916),r=e.i(74677),s=e.i(69741),c=e.i(16795),l=e.i(87718),h=e.i(95169),d=e.i(47587),p=e.i(66012),E=e.i(70101),u=e.i(26937),_=e.i(10372),w=e.i(93695);e.i(52474);var T=e.i(220),S=e.i(89171);async function f(e){let t=e.headers.get("host")||"127.0.0.1:3000",a=e.headers.get("x-forwarded-proto")||"http",n=`${a}://${t}`,i=`#!/bin/bash
2
- # =============================================================================
3
- # Witty-Skill-Insight One-Click Setup
4
- # =============================================================================
5
-
6
- WITTY_HOST="${t}"
7
- WITTY_BASE_URL="${n}"
8
-
9
- echo "๐Ÿš€ Fetching Witty-Skill-Insight telemetry components from $WITTY_BASE_URL..."
10
-
11
- # 1. Setup Directories
12
- mkdir -p "$HOME/.witty"
13
- mkdir -p "$HOME/.witty/logs"
14
- mkdir -p "$HOME/.opencode/plugins"
15
- mkdir -p "$HOME/.opencode/skills"
16
- mkdir -p "$HOME/.claude/projects"
17
- mkdir -p "$HOME/.openclaw/agents"
18
- mkdir -p ".opencode/skills"
19
- echo "๐Ÿ“‚ Created necessary directories"
20
-
21
- # 2. Interactive Framework Selection with inquirer
22
- echo ""
23
-
24
- SELECTOR_SCRIPT="$HOME/.witty/framework_selector.mjs"
25
- SELECTOR_RESULT="$HOME/.witty/.selector_result"
26
-
27
- # Install inquirer if not already installed
28
- cd "$HOME/.witty"
29
- if [ ! -d "node_modules/inquirer" ]; then
30
- echo "๐Ÿ“ฆ Installing inquirer for interactive selection..."
31
- npm install inquirer --save 2>/dev/null
32
- fi
33
-
34
- cat > "$SELECTOR_SCRIPT" << 'SELECTOR_EOF'
35
- import inquirer from 'inquirer';
36
- import fs from 'fs';
37
-
38
- const frameworks = [
39
- { name: 'OpenCode', value: 'opencode' },
40
- { name: 'Claude Code', value: 'claude' },
41
- { name: 'OpenClaw', value: 'openclaw' }
42
- ];
43
-
44
- async function select() {
45
- console.log('');
46
- console.log('\\x1b[36m%s\\x1b[0m', 'โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—');
47
- console.log('\\x1b[36m%s\\x1b[0m', 'โ•‘ โ•‘');
48
- console.log('\\x1b[1m\\x1b[36m%s\\x1b[0m', 'โ•‘ โœจ skill-insight โœจ โ•‘');
49
- console.log('\\x1b[36m%s\\x1b[0m', 'โ•‘ โ•‘');
50
- console.log('\\x1b[36m%s\\x1b[0m', 'โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•');
51
- console.log('');
52
- console.log('\\x1b[90m%s\\x1b[0m', ' ๆ็คบ: โ†‘โ†“ ็งปๅŠจ | ็ฉบๆ ผ ้€‰ๆ‹ฉ | a ๅ…จ้€‰ | i ๅ้€‰ | Enter ็กฎ่ฎค');
53
- console.log('');
54
-
55
- const answers = await inquirer.prompt([
56
- {
57
- type: 'checkbox',
58
- name: 'frameworks',
59
- message: '้›†ๆˆๅˆฐ๏ผš',
60
- choices: frameworks,
61
- pageSize: 10,
62
- loop: false
63
- }
64
- ]);
65
-
66
- const selected = answers.frameworks;
67
-
68
- if (selected.length > 0) {
69
- console.log('');
70
- console.log('\\x1b[32m%s\\x1b[0m', 'โœ… ๅฐ†ๅฎ‰่ฃ…ไปฅไธ‹็ป„ไปถ:');
71
- selected.forEach(fw => {
72
- const name = frameworks.find(f => f.value === fw)?.name || fw;
73
- console.log('\\x1b[32m%s\\x1b[0m', ' โ€ข ' + name);
74
- });
75
- console.log('');
76
- } else {
77
- console.log('');
78
- console.log('\\x1b[33m%s\\x1b[0m', 'โš ๏ธ ๆœช้€‰ๆ‹ฉไปปไฝ•็ป„ไปถ๏ผŒๅฐ†ไธ่ฟ›่กŒๅฎ‰่ฃ…ใ€‚');
79
- console.log('');
80
- }
81
-
82
- // Write result to file for bash to read
83
- const resultFile = process.env.SELECTOR_RESULT_FILE || process.env.HOME + '/.witty/.selector_result';
84
- fs.writeFileSync(resultFile, selected.join(','));
85
- }
86
-
87
- select().catch(err => {
88
- console.error('Error:', err);
89
- process.exit(1);
90
- });
91
- SELECTOR_EOF
92
-
93
- # Run the selector interactively from /dev/tty
94
- # Export the result file path so the selector knows where to write
95
- export SELECTOR_RESULT_FILE="$SELECTOR_RESULT"
96
- cd "$HOME/.witty" && npx -y tsx "$SELECTOR_SCRIPT" < /dev/tty
97
-
98
- # Read the selection result from file
99
- if [ -f "$SELECTOR_RESULT" ]; then
100
- SELECTED_FRAMEWORKS=$(cat "$SELECTOR_RESULT")
101
- rm -f "$SELECTOR_RESULT"
102
- else
103
- SELECTED_FRAMEWORKS=""
104
- fi
105
-
106
- # Set installation flags based on selection
107
- INSTALL_OPENCODE=false
108
- INSTALL_CLAUDE=false
109
- INSTALL_OPENCLAW=false
110
-
111
- if [[ "$SELECTED_FRAMEWORKS" == *"opencode"* ]]; then
112
- INSTALL_OPENCODE=true
113
- fi
114
- if [[ "$SELECTED_FRAMEWORKS" == *"claude"* ]]; then
115
- INSTALL_CLAUDE=true
116
- fi
117
- if [[ "$SELECTED_FRAMEWORKS" == *"openclaw"* ]]; then
118
- INSTALL_OPENCLAW=true
119
- fi
120
-
121
- # Exit if nothing selected
122
- if [ "$INSTALL_OPENCODE" = "false" ] && [ "$INSTALL_CLAUDE" = "false" ] && [ "$INSTALL_OPENCLAW" = "false" ]; then
123
- echo "โš ๏ธ ๆœช้€‰ๆ‹ฉไปปไฝ•ๆก†ๆžถ็ป„ไปถ๏ผŒๅฐ†่ทณ่ฟ‡ๆ’ไปถๅฎ‰่ฃ…ใ€‚"
124
- echo " ็ปง็ปญๆ‰ง่กŒ้…็ฝฎๆญฅ้ชค..."
125
- echo ""
126
- fi
127
-
128
- # 3. Download Components
129
- if [ "$INSTALL_OPENCODE" = "true" ]; then
130
- echo "โฌ Downloading OpenCode Plugin..."
131
- curl -sSf "$WITTY_BASE_URL/api/setup/opencode" -o "$HOME/.opencode/plugins/Witty-Skill-Insight.ts"
132
-
133
- echo "โฌ Downloading Skill Sync Tool..."
134
- curl -sSf "$WITTY_BASE_URL/sync_skills.ts" -o "$HOME/.witty/sync_skills.ts"
135
- fi
136
-
137
- if [ "$INSTALL_CLAUDE" = "true" ]; then
138
- echo "โฌ Downloading Claude Code Watcher..."
139
- curl -sSf "$WITTY_BASE_URL/api/setup/claude-watcher" -o "$HOME/.witty/claude_watcher_client.ts"
140
- fi
141
-
142
- if [ "$INSTALL_OPENCLAW" = "true" ]; then
143
- echo "โฌ Downloading OpenClaw Watcher..."
144
- curl -sSf "$WITTY_BASE_URL/api/setup/openclaw-watcher" -o "$HOME/.witty/openclaw_watcher_client.ts"
145
- fi
146
-
147
- # 4. Configure ~/.witty/.env
148
- WITTY_CONFIG_FILE="$HOME/.witty/.env"
149
- EXISTING_KEY=""
150
- EXISTING_HOST=""
151
- if [ -f "$WITTY_CONFIG_FILE" ]; then
152
- EXISTING_KEY=$(grep '^WITTY_INSIGHT_API_KEY=' "$WITTY_CONFIG_FILE" | head -n 1 | cut -d'=' -f2-)
153
- EXISTING_HOST=$(grep '^WITTY_INSIGHT_HOST=' "$WITTY_CONFIG_FILE" | head -n 1 | cut -d'=' -f2-)
154
- fi
155
-
156
- # -- API Key Logic --
157
- FINAL_KEY="$EXISTING_KEY"
158
- if [ -n "$EXISTING_KEY" ]; then
159
- echo "๐Ÿ”‘ Found existing API Key."
160
- read -p "๐Ÿ‘‰ Use existing key? (y/N, Default: y): " USE_EXISTING < /dev/tty
161
- if [[ "$USE_EXISTING" =~ ^[Nn]$ ]]; then
162
- read -p "๐Ÿ‘‰ Please enter your NEW API Key: " FINAL_KEY < /dev/tty
163
- fi
164
- else
165
- echo "๐Ÿ”‘ WITTY_INSIGHT_API_KEY is not set."
166
- read -p "๐Ÿ‘‰ Please enter your API Key: " FINAL_KEY < /dev/tty
167
- fi
168
-
169
- # -- Host Logic --
170
- FINAL_HOST="$WITTY_HOST"
171
- if [ -n "$EXISTING_HOST" ] && [ "$EXISTING_HOST" != "$WITTY_HOST" ]; then
172
- echo "๐ŸŒ Current Host in config: $EXISTING_HOST"
173
- echo "๐ŸŒ New Host detected: $WITTY_HOST"
174
- read -p "๐Ÿ‘‰ Change to new Host? (y/N, Default: y): " CHANGE_HOST < /dev/tty
175
- if [[ "$CHANGE_HOST" =~ ^[Nn]$ ]]; then
176
- FINAL_HOST="$EXISTING_HOST"
177
- fi
178
- elif [ -z "$EXISTING_HOST" ]; then
179
- FINAL_HOST="$WITTY_HOST"
180
- fi
181
-
182
- if [ -z "$FINAL_KEY" ]; then
183
- echo "โš ๏ธ Warning: No API Key provided. Telemetry upload will fail until you set it in $WITTY_CONFIG_FILE"
184
- fi
185
-
186
- echo "โš™๏ธ Updating configuration..."
187
- touch "$WITTY_CONFIG_FILE"
188
- cp "$WITTY_CONFIG_FILE" "\${WITTY_CONFIG_FILE}.bak"
189
- grep -v "^WITTY_INSIGHT_HOST=" "\${WITTY_CONFIG_FILE}.bak" | grep -v "^WITTY_INSIGHT_API_KEY=" > "$WITTY_CONFIG_FILE"
190
- echo "WITTY_INSIGHT_HOST=$FINAL_HOST" >> "$WITTY_CONFIG_FILE"
191
- echo "WITTY_INSIGHT_API_KEY=$FINAL_KEY" >> "$WITTY_CONFIG_FILE"
192
- rm "\${WITTY_CONFIG_FILE}.bak"
193
- echo "โœ… Configuration updated at $WITTY_CONFIG_FILE"
194
-
195
- # 5. Sync Opencode Skills
196
- if [ "$INSTALL_OPENCODE" = "true" ]; then
197
- echo ""
198
- echo "๐Ÿš€ Syncing Opencode Skills..."
199
- if command -v npx &> /dev/null; then
200
- npx -y tsx "$HOME/.witty/sync_skills.ts" --agent opencode
201
- else
202
- echo "โš ๏ธ Node.js (npx) not found. Skipping skill sync."
203
- fi
204
- fi
205
-
206
- # 6. Install Watcher Dependencies (only if any watcher is selected)
207
- if [ "$INSTALL_CLAUDE" = "true" ] || [ "$INSTALL_OPENCLAW" = "true" ]; then
208
- echo ""
209
- echo "๐Ÿ“ฆ Installing watcher dependencies..."
210
- if command -v npm &> /dev/null; then
211
- cd "$HOME/.witty"
212
- if [ ! -f "package.json" ]; then
213
- echo '{"name": "witty-watcher", "version": "1.0.0", "type": "module", "dependencies": {}}' > package.json
214
- fi
215
- npm install chokidar --save 2>/dev/null
216
- echo "โœ… Dependencies installed"
217
- else
218
- echo "โš ๏ธ npm not found. Skipping dependency installation."
219
- fi
220
- fi
221
-
222
- # 7. Create Watcher Startup/Stop Scripts
223
- NEEDS_WATCHER_SCRIPTS=false
224
- if [ "$INSTALL_CLAUDE" = "true" ] || [ "$INSTALL_OPENCLAW" = "true" ]; then
225
- NEEDS_WATCHER_SCRIPTS=true
226
- fi
227
-
228
- if [ "$NEEDS_WATCHER_SCRIPTS" = "true" ]; then
229
- echo ""
230
- echo "๐Ÿ“ Creating watcher management scripts..."
231
-
232
- # Claude Watcher Start Script
233
- if [ "$INSTALL_CLAUDE" = "true" ]; then
234
- cat > "$HOME/.witty/start_claude_watcher.sh" << 'WATCHER_EOF'
235
- #!/bin/bash
236
- # Stop existing watcher if running
237
- pkill -f "claude_watcher_client.ts" 2>/dev/null
238
-
239
- # Start watcher in background
240
- cd "$HOME/.witty" && nohup npx -y tsx "$HOME/.witty/claude_watcher_client.ts" > "$HOME/.witty/logs/claude_watcher.log" 2>&1 &
241
- echo $! > "$HOME/.witty/claude_watcher.pid"
242
- echo "Claude watcher started with PID $(cat $HOME/.witty/claude_watcher.pid)"
243
- WATCHER_EOF
244
- chmod +x "$HOME/.witty/start_claude_watcher.sh"
245
- echo "โœ… Claude watcher start script created"
246
-
247
- # Claude Watcher Stop Script
248
- cat > "$HOME/.witty/stop_claude_watcher.sh" << 'STOP_CLAUDE_EOF'
249
- #!/bin/bash
250
- echo "Stopping Claude watcher..."
251
- pkill -f "claude_watcher_client.ts" 2>/dev/null
252
- rm -f "$HOME/.witty/claude_watcher.pid"
253
- echo "Claude watcher stopped"
254
- STOP_CLAUDE_EOF
255
- chmod +x "$HOME/.witty/stop_claude_watcher.sh"
256
- echo "โœ… Claude watcher stop script created"
257
- fi
258
-
259
- # OpenClaw Watcher Start Script
260
- if [ "$INSTALL_OPENCLAW" = "true" ]; then
261
- cat > "$HOME/.witty/start_openclaw_watcher.sh" << 'WATCHER_EOF'
262
- #!/bin/bash
263
- # Stop existing watcher if running
264
- pkill -f "openclaw_watcher_client.ts" 2>/dev/null
265
-
266
- # Start watcher in background
267
- cd "$HOME/.witty" && nohup npx -y tsx "$HOME/.witty/openclaw_watcher_client.ts" > "$HOME/.witty/logs/openclaw_watcher.log" 2>&1 &
268
- echo $! > "$HOME/.witty/openclaw_watcher.pid"
269
- echo "OpenClaw watcher started with PID $(cat $HOME/.witty/openclaw_watcher.pid)"
270
- WATCHER_EOF
271
- chmod +x "$HOME/.witty/start_openclaw_watcher.sh"
272
- echo "โœ… OpenClaw watcher start script created"
273
-
274
- # OpenClaw Watcher Stop Script
275
- cat > "$HOME/.witty/stop_openclaw_watcher.sh" << 'STOP_OPENCLAW_EOF'
276
- #!/bin/bash
277
- echo "Stopping OpenClaw watcher..."
278
- pkill -f "openclaw_watcher_client.ts" 2>/dev/null
279
- rm -f "$HOME/.witty/openclaw_watcher.pid"
280
- echo "OpenClaw watcher stopped"
281
- STOP_OPENCLAW_EOF
282
- chmod +x "$HOME/.witty/stop_openclaw_watcher.sh"
283
- echo "โœ… OpenClaw watcher stop script created"
284
- fi
285
-
286
- # Combined Start Script - Dynamic generation
287
- cat > "$HOME/.witty/start_watchers.sh" << 'WATCHER_HEADER'
288
- #!/bin/bash
289
- echo "Starting Witty-Skill-Insight watchers..."
290
- WATCHER_HEADER
291
-
292
- if [ "$INSTALL_CLAUDE" = "true" ]; then
293
- echo '"$HOME/.witty/start_claude_watcher.sh"' >> "$HOME/.witty/start_watchers.sh"
294
- fi
295
- if [ "$INSTALL_OPENCLAW" = "true" ]; then
296
- echo '"$HOME/.witty/start_openclaw_watcher.sh"' >> "$HOME/.witty/start_watchers.sh"
297
- fi
298
-
299
- echo 'echo "All watchers started!"' >> "$HOME/.witty/start_watchers.sh"
300
- chmod +x "$HOME/.witty/start_watchers.sh"
301
- echo "โœ… Combined start script created"
302
-
303
- # Combined Stop Script - Dynamic generation
304
- cat > "$HOME/.witty/stop_watchers.sh" << 'STOP_HEADER'
305
- #!/bin/bash
306
- echo "Stopping Witty-Skill-Insight watchers..."
307
- STOP_HEADER
308
-
309
- if [ "$INSTALL_CLAUDE" = "true" ]; then
310
- echo '"$HOME/.witty/stop_claude_watcher.sh"' >> "$HOME/.witty/stop_watchers.sh"
311
- fi
312
- if [ "$INSTALL_OPENCLAW" = "true" ]; then
313
- echo '"$HOME/.witty/stop_openclaw_watcher.sh"' >> "$HOME/.witty/stop_watchers.sh"
314
- fi
315
-
316
- echo 'echo "All watchers stopped!"' >> "$HOME/.witty/stop_watchers.sh"
317
- chmod +x "$HOME/.witty/stop_watchers.sh"
318
- echo "โœ… Combined stop script created"
319
- fi
320
-
321
- # 8. Start Watchers Now
322
- if [ "$NEEDS_WATCHER_SCRIPTS" = "true" ]; then
323
- echo ""
324
- echo "๐Ÿš€ Starting telemetry watchers..."
325
- if command -v npx &> /dev/null; then
326
- "$HOME/.witty/start_watchers.sh"
327
- else
328
- echo "โš ๏ธ Node.js (npx) not found. Skipping watcher startup."
329
- fi
330
- fi
331
-
332
- # 9. Configure Claude Code Auto-Sync Wrapper
333
- if [ "$INSTALL_CLAUDE" = "true" ]; then
334
- echo ""
335
- echo "๐Ÿ”„ Configuring Claude Code Auto-Sync Wrapper..."
336
- CLAUDE_WRAPPER='
337
- # Witty Insight Claude Alliance
338
- witty-claude() {
339
- if command -v npx &> /dev/null; then
340
- npx -y tsx "$HOME/.witty/sync_skills.ts" --agent claude >/dev/null 2>&1
341
- fi
342
- command claude "$@"
343
- }
344
- alias claude="witty-claude"
345
- '
346
-
347
- for rc_file in "$HOME/.bashrc" "$HOME/.zshrc"; do
348
- if [ -f "$rc_file" ]; then
349
- if ! grep -q "witty-claude()" "$rc_file" 2>/dev/null; then
350
- echo "$CLAUDE_WRAPPER" >> "$rc_file"
351
- echo "โœ… Installed Claude wrapper to $rc_file"
352
- fi
353
- fi
354
- done
355
- fi
356
-
357
- # 10. Final Summary
358
- echo ""
359
- echo "๐ŸŒŸ Witty-Skill-Insight Telemetry: READY"
360
- echo "------------------------------------------------"
361
- echo "Installed Components:"
362
- if [ "$INSTALL_OPENCODE" = "true" ]; then
363
- echo " โœ… OpenCode Plugin: ~/.opencode/plugins/Witty-Skill-Insight.ts"
364
- fi
365
- if [ "$INSTALL_CLAUDE" = "true" ]; then
366
- echo " โœ… Claude Watcher: ~/.witty/claude_watcher_client.ts"
367
- fi
368
- if [ "$INSTALL_OPENCLAW" = "true" ]; then
369
- echo " โœ… OpenClaw Watcher: ~/.witty/openclaw_watcher_client.ts"
370
- fi
371
-
372
- if [ "$NEEDS_WATCHER_SCRIPTS" = "true" ]; then
373
- echo ""
374
- echo "Watcher Management:"
375
- echo " Start all: ~/.witty/start_watchers.sh"
376
- echo " Stop all: ~/.witty/stop_watchers.sh"
377
- if [ "$INSTALL_CLAUDE" = "true" ]; then
378
- echo " Start Claude: ~/.witty/start_claude_watcher.sh"
379
- echo " Stop Claude: ~/.witty/stop_claude_watcher.sh"
380
- fi
381
- if [ "$INSTALL_OPENCLAW" = "true" ]; then
382
- echo " Start OpenClaw: ~/.witty/start_openclaw_watcher.sh"
383
- echo " Stop OpenClaw: ~/.witty/stop_openclaw_watcher.sh"
384
- fi
385
- echo " Logs: ~/.witty/logs/"
386
- fi
387
-
388
- echo ""
389
- echo "Usage:"
390
- if [ "$INSTALL_OPENCODE" = "true" ]; then
391
- echo " 1. Run: opencode run 'hello'"
392
- fi
393
- if [ "$INSTALL_CLAUDE" = "true" ]; then
394
- echo " 2. Run: claude (restart terminal first)"
395
- fi
396
- if [ "$INSTALL_OPENCLAW" = "true" ]; then
397
- echo " 3. OpenClaw will automatically monitor and upload telemetry"
398
- fi
399
- echo "------------------------------------------------"
400
- `;return new S.NextResponse(i,{headers:{"Content-Type":"text/x-shellscript"}})}e.s(["GET",()=>f],21965);var I=e.i(21965);let O=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/setup/route",pathname:"/api/setup",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/setup/route.ts",nextConfigOutput:"standalone",userland:I}),{workAsyncStorage:C,workUnitAsyncStorage:L,serverHooks:$}=O;function y(){return(0,n.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:L})}async function A(e,t,n){O.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let S="/api/setup/route";S=S.replace(/\/index$/,"")||"/";let f=await O.prepare(e,t,{srcPage:S,multiZoneDraftMode:!1});if(!f)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:I,params:C,nextConfig:L,parsedUrl:$,isDraftMode:y,prerenderManifest:A,routerServerContext:N,isOnDemandRevalidate:g,revalidateOnlyGenerated:m,resolvedPathname:R,clientReferenceManifest:H,serverActionsManifest:W}=f,v=(0,s.normalizeAppPath)(S),x=!!(A.dynamicRoutes[v]||A.routes[R]),P=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,$,!1):t.end("This page could not be found"),null);if(x&&!y){let e=!!A.routes[R],t=A.dynamicRoutes[v];if(t&&!1===t.fallback&&!e){if(L.experimental.adapterPath)return await P();throw new w.NoFallbackError}}let M=null;!x||O.isDev||y||(M="/index"===(M=R)?"/":M);let F=!0===O.isDev||!x,b=x&&!F;W&&H&&(0,r.setManifestsSingleton)({page:S,clientReferenceManifest:H,serverActionsManifest:W});let D=e.method||"GET",k=(0,o.getTracer)(),U=k.getActiveScopeSpan(),Y={params:C,prerenderManifest:A,renderOpts:{experimental:{authInterrupts:!!L.experimental.authInterrupts},cacheComponents:!!L.cacheComponents,supportsDynamicResponse:F,incrementalCache:(0,i.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:L.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,n,i)=>O.onRequestError(e,t,n,i,N)},sharedContext:{buildId:I}},G=new c.NodeNextRequest(e),K=new c.NodeNextResponse(t),q=l.NextRequestAdapter.fromNodeNextRequest(G,(0,l.signalFromNodeResponse)(t));try{let r=async e=>O.handle(q,Y).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let a=k.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==h.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=a.get("next.route");if(n){let t=`${D} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${D} ${S}`)}),s=!!(0,i.getRequestMeta)(e,"minimalMode"),c=async i=>{var o,c;let l=async({previousCacheEntry:a})=>{try{if(!s&&g&&m&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let o=await r(i);e.fetchMetrics=Y.renderOpts.fetchMetrics;let c=Y.renderOpts.pendingWaitUntil;c&&n.waitUntil&&(n.waitUntil(c),c=void 0);let l=Y.renderOpts.collectedTags;if(!x)return await (0,p.sendResponse)(G,K,o,Y.renderOpts.pendingWaitUntil),null;{let e=await o.blob(),t=(0,E.toNodeOutgoingHttpHeaders)(o.headers);l&&(t[_.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==Y.renderOpts.collectedRevalidate&&!(Y.renderOpts.collectedRevalidate>=_.INFINITE_CACHE)&&Y.renderOpts.collectedRevalidate,n=void 0===Y.renderOpts.collectedExpire||Y.renderOpts.collectedExpire>=_.INFINITE_CACHE?void 0:Y.renderOpts.collectedExpire;return{value:{kind:T.CachedRouteKind.APP_ROUTE,status:o.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:n}}}}catch(t){throw(null==a?void 0:a.isStale)&&await O.onRequestError(e,t,{routerKind:"App Router",routePath:S,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:b,isOnDemandRevalidate:g})},!1,N),t}},h=await O.handleResponse({req:e,nextConfig:L,cacheKey:M,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:g,revalidateOnlyGenerated:m,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:s});if(!x)return null;if((null==h||null==(o=h.value)?void 0:o.kind)!==T.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==h||null==(c=h.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",g?"REVALIDATED":h.isMiss?"MISS":h.isStale?"STALE":"HIT"),y&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let w=(0,E.fromNodeOutgoingHttpHeaders)(h.value.headers);return s&&x||w.delete(_.NEXT_CACHE_TAGS_HEADER),!h.cacheControl||t.getHeader("Cache-Control")||w.get("Cache-Control")||w.set("Cache-Control",(0,u.getCacheControlHeader)(h.cacheControl)),await (0,p.sendResponse)(G,K,new Response(h.value.body,{headers:w,status:h.value.status||200})),null};U?await c(U):await k.withPropagatedContext(e.headers,()=>k.trace(h.BaseServerSpan.handleRequest,{spanName:`${D} ${S}`,kind:o.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},c))}catch(t){if(t instanceof w.NoFallbackError||await O.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:b,isOnDemandRevalidate:g})},!1,N),x)throw t;return await (0,p.sendResponse)(G,K,new Response(null,{status:500})),null}}e.s(["handler",()=>A,"patchFetch",()=>y,"routeModule",()=>O,"serverHooks",()=>$,"workAsyncStorage",()=>C,"workUnitAsyncStorage",()=>L],26984)}];
1
+ module.exports=[26984,e=>{"use strict";var n=e.i(47909),t=e.i(74017),i=e.i(60476),s=e.i(59756),o=e.i(61916),l=e.i(74677),r=e.i(69741),a=e.i(16795),c=e.i(87718),h=e.i(95169),S=e.i(47587),_=e.i(66012),I=e.i(70101),E=e.i(26937),L=e.i(10372),d=e.i(93695);e.i(52474);var p=e.i(220),u=e.i(89171);async function T(e){let n,t,i=e.headers.get("x-forwarded-host")||e.headers.get("host")||"127.0.0.1:3000",s=e.headers.get("x-forwarded-proto")||"https";new URL(e.url).pathname.replace(/\/api\/setup\/?$/,"");let o=`${s}://${i}`;if("windows"==(n=e.headers.get("user-agent")||"",(t=e.headers.get("x-platform")||"")?"windows"===t.toLowerCase()?"windows":"unix":n.toLowerCase().includes("windows")?"windows":"unix")){let e=["# =============================================================================\n# Skill-insight One-Click Setup (PowerShell)\n# =============================================================================\n",'$SKILL_INSIGHT_HOST = "'+o+'"','$SKILL_INSIGHT_BASE_URL = "'+o+'"','\nWrite-Host "๐Ÿš€ Fetching Skill-insight telemetry components from $SKILL_INSIGHT_BASE_URL..."\n\n# 1. Setup Directories\n$homeDir = $env:USERPROFILE\nNew-Item -ItemType Directory -Force -Path "$homeDir\\.skill-insight" | Out-Null\nNew-Item -ItemType Directory -Force -Path "$homeDir\\.skill-insight\\logs" | Out-Null\nNew-Item -ItemType Directory -Force -Path "$homeDir\\.opencode\\plugins" | Out-Null\nNew-Item -ItemType Directory -Force -Path "$homeDir\\.opencode\\skills" | Out-Null\nNew-Item -ItemType Directory -Force -Path "$homeDir\\.claude\\projects" | Out-Null\nNew-Item -ItemType Directory -Force -Path "$homeDir\\.openclaw\\agents" | Out-Null\nNew-Item -ItemType Directory -Force -Path ".opencode\\skills" | Out-Null\nWrite-Host "๐Ÿ“‚ Created necessary directories"\n\n# 2. Interactive Framework Selection with inquirer\nWrite-Host ""\n\n$SELECTOR_SCRIPT = "$homeDir\\.skill-insight\\framework_selector.mjs"\n$SELECTOR_RESULT = "$homeDir\\.skill-insight\\.selector_result"\n\n# Install inquirer if not already installed\nSet-Location "$homeDir\\.skill-insight"\nif (-not (Test-Path "node_modules\\inquirer")) {\n Write-Host "๐Ÿ“ฆ Installing inquirer for interactive selection..."\n npm install inquirer --save 2>$null\n}\n\n$selectorContent = @\'\nimport inquirer from \'inquirer\';\nimport fs from \'fs\';\n\nconst frameworks = [\n { name: \'OpenCode\', value: \'opencode\' },\n { name: \'Claude Code\', value: \'claude\' },\n { name: \'OpenClaw\', value: \'openclaw\' }\n];\n\nasync function select() {\n console.log(\'\');\n console.log(\'\\x1b[36m%s\\x1b[0m\', \'โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—\');\n console.log(\'\\x1b[36m%s\\x1b[0m\', \'โ•‘ โ•‘\');\n console.log(\'\\x1b[1m\\x1b[36m%s\\x1b[0m\', \'โ•‘ โœจ Skill-insight โœจ โ•‘\');\n console.log(\'\\x1b[36m%s\\x1b[0m\', \'โ•‘ โ•‘\');\n console.log(\'\\x1b[36m%s\\x1b[0m\', \'โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•\');\n console.log(\'\');\n console.log(\'\\x1b[90m%s\\x1b[0m\', \' ๆ็คบ: โ†‘โ†“ ็งปๅŠจ | ็ฉบๆ ผ ้€‰ๆ‹ฉ | a ๅ…จ้€‰ | i ๅ้€‰ | Enter ็กฎ่ฎค\');\n console.log(\'\');\n\n const answers = await inquirer.prompt([\n {\n type: \'checkbox\',\n name: \'frameworks\',\n message: \'้›†ๆˆๅˆฐ๏ผš\',\n choices: frameworks,\n pageSize: 10,\n loop: false\n }\n ]);\n\n const selected = answers.frameworks;\n \n if (selected.length > 0) {\n console.log(\'\');\n console.log(\'\\x1b[32m%s\\x1b[0m\', \'โœ… ๅฐ†ๅฎ‰่ฃ…ไปฅไธ‹็ป„ไปถ:\');\n selected.forEach(fw => {\n const name = frameworks.find(f => f.value === fw)?.name || fw;\n console.log(\'\\x1b[32m%s\\x1b[0m\', \' โ€ข \' + name);\n });\n console.log(\'\');\n } else {\n console.log(\'\');\n console.log(\'\\x1b[33m%s\\x1b[0m\', \'โš ๏ธ ๆœช้€‰ๆ‹ฉไปปไฝ•็ป„ไปถ๏ผŒๅฐ†ไธ่ฟ›่กŒๅฎ‰่ฃ…ใ€‚\');\n console.log(\'\');\n }\n\n const resultFile = process.env.SELECTOR_RESULT_FILE || process.env.USERPROFILE + \'\\\\.skill-insight\\\\.selector_result\';\n fs.writeFileSync(resultFile, selected.join(\',\'));\n}\n\nselect().catch(err => {\n console.error(\'Error:\', err);\n process.exit(1);\n});\n\'@\n\nSet-Content -Path $SELECTOR_SCRIPT -Value $selectorContent -Encoding UTF8\n\n# Run the selector interactively\n$env:SELECTOR_RESULT_FILE = $SELECTOR_RESULT\nSet-Location "$homeDir\\.skill-insight"\nnpx -y tsx $SELECTOR_SCRIPT\n\n# Read the selection result from file\nif (Test-Path $SELECTOR_RESULT) {\n $SELECTED_FRAMEWORKS = Get-Content $SELECTOR_RESULT\n Remove-Item $SELECTOR_RESULT -Force\n} else {\n $SELECTED_FRAMEWORKS = ""\n}\n\n# Set installation flags based on selection\n$INSTALL_OPENCODE = $false\n$INSTALL_CLAUDE = $false\n$INSTALL_OPENCLAW = $false\n\nif ($SELECTED_FRAMEWORKS -match "opencode") {\n $INSTALL_OPENCODE = $true\n}\nif ($SELECTED_FRAMEWORKS -match "claude") {\n $INSTALL_CLAUDE = $true\n}\nif ($SELECTED_FRAMEWORKS -match "openclaw") {\n $INSTALL_OPENCLAW = $true\n}\n\n# Exit if nothing selected\nif (-not $INSTALL_OPENCODE -and -not $INSTALL_CLAUDE -and -not $INSTALL_OPENCLAW) {\n Write-Host "โš ๏ธ ๆœช้€‰ๆ‹ฉไปปไฝ•ๆก†ๆžถ็ป„ไปถ๏ผŒๅฐ†่ทณ่ฟ‡ๆ’ไปถๅฎ‰่ฃ…ใ€‚"\n Write-Host " ็ปง็ปญๆ‰ง่กŒ้…็ฝฎๆญฅ้ชค..."\n Write-Host ""\n}\n\n# 3. Download Components\nif ($INSTALL_OPENCODE) {\n Write-Host "โฌ Downloading OpenCode Plugin..."\n Invoke-WebRequest -Uri "$SKILL_INSIGHT_BASE_URL/api/setup/opencode" -OutFile "$homeDir\\.opencode\\plugins\\Witty-Skill-Insight.ts"\n}\n\nif ($INSTALL_CLAUDE) {\n Write-Host "โฌ Downloading Claude Code Watcher..."\n Invoke-WebRequest -Uri "$SKILL_INSIGHT_BASE_URL/api/setup/claude-watcher" -OutFile "$homeDir\\.skill-insight\\claude_watcher_client.ts"\n}\n\nif ($INSTALL_OPENCLAW) {\n Write-Host "โฌ Downloading OpenClaw Watcher..."\n Invoke-WebRequest -Uri "$SKILL_INSIGHT_BASE_URL/api/setup/openclaw-watcher" -OutFile "$homeDir\\.skill-insight\\openclaw_watcher_client.ts"\n}\n\n# 4. Configure ~/.skill-insight/.env\n$SKILL_INSIGHT_CONFIG_FILE = "$homeDir\\.skill-insight\\.env"\n$EXISTING_KEY = ""\n$EXISTING_HOST = ""\nif (Test-Path $SKILL_INSIGHT_CONFIG_FILE) {\n $content = Get-Content $SKILL_INSIGHT_CONFIG_FILE\n $keyLine = $content | Select-String \'^SKILL_INSIGHT_API_KEY=\' | Select-Object -First 1\n $hostLine = $content | Select-String \'^SKILL_INSIGHT_HOST=\' | Select-Object -First 1\n if ($keyLine) {\n $EXISTING_KEY = $keyLine.Line.Substring(\'SKILL_INSIGHT_API_KEY=\'.Length)\n }\n if ($hostLine) {\n $EXISTING_HOST = $hostLine.Line.Substring(\'SKILL_INSIGHT_HOST=\'.Length)\n }\n}\n\n# -- API Key Logic --\n$FINAL_KEY = $EXISTING_KEY\nif ($EXISTING_KEY) {\n Write-Host "๐Ÿ”‘ Found existing API Key."\n $USE_EXISTING = Read-Host "๐Ÿ‘‰ Use existing key? (y/N, Default: y)"\n if ($USE_EXISTING -match \'^[Nn]$\') {\n $FINAL_KEY = Read-Host "๐Ÿ‘‰ Please enter your NEW API Key"\n }\n} else {\n Write-Host "๐Ÿ”‘ SKILL_INSIGHT_API_KEY is not set."\n $FINAL_KEY = Read-Host "๐Ÿ‘‰ Please enter your API Key"\n}\n\n# -- Host Logic --\n$FINAL_HOST = $SKILL_INSIGHT_HOST\nif ($EXISTING_HOST -and ($EXISTING_HOST -ne $SKILL_INSIGHT_HOST)) {\n Write-Host "๐ŸŒ Current Host in config: $EXISTING_HOST"\n Write-Host "๐ŸŒ New Host detected: $SKILL_INSIGHT_HOST"\n $CHANGE_HOST = Read-Host "๐Ÿ‘‰ Change to new Host? (y/N, Default: y)"\n if ($CHANGE_HOST -match \'^[Nn]$\') {\n $FINAL_HOST = $EXISTING_HOST\n }\n} elseif (-not $EXISTING_HOST) {\n $FINAL_HOST = $SKILL_INSIGHT_HOST\n}\n\nif (-not $FINAL_KEY) {\n Write-Host "โš ๏ธ Warning: No API Key provided. Telemetry upload will fail until you set it in $SKILL_INSIGHT_CONFIG_FILE"\n}\n\nWrite-Host "โš™๏ธ Updating configuration..."\nNew-Item -ItemType File -Path $SKILL_INSIGHT_CONFIG_FILE -Force | Out-Null\nCopy-Item $SKILL_INSIGHT_CONFIG_FILE "$SKILL_INSIGHT_CONFIG_FILE.bak"\n$content = Get-Content "$SKILL_INSIGHT_CONFIG_FILE.bak"\n$content | Where-Object { $_ -notmatch \'^SKILL_INSIGHT_HOST=\' -and $_ -notmatch \'^SKILL_INSIGHT_API_KEY=\' } | Set-Content $SKILL_INSIGHT_CONFIG_FILE\nAdd-Content $SKILL_INSIGHT_CONFIG_FILE "SKILL_INSIGHT_HOST=$FINAL_HOST"\nAdd-Content $SKILL_INSIGHT_CONFIG_FILE "SKILL_INSIGHT_API_KEY=$FINAL_KEY"\nRemove-Item "$SKILL_INSIGHT_CONFIG_FILE.bak" -Force\nWrite-Host "โœ… Configuration updated at $SKILL_INSIGHT_CONFIG_FILE"\n\n# 6. Install Watcher Dependencies\nif ($INSTALL_CLAUDE -or $INSTALL_OPENCLAW) {\n Write-Host ""\n Write-Host "๐Ÿ“ฆ Installing watcher dependencies..."\n if (Get-Command npm -ErrorAction SilentlyContinue) {\n Set-Location "$homeDir\\.skill-insight"\n if (-not (Test-Path "package.json")) {\n \'{"name": "skill-insight-watcher", "version": "1.0.0", "type": "module", "dependencies": {}}\' | Out-File -FilePath "package.json" -Encoding utf8\n }\n npm install chokidar --save 2>$null\n Write-Host "โœ… Dependencies installed"\n } else {\n Write-Host "โš ๏ธ npm not found. Skipping dependency installation."\n }\n}\n\n# 7. Create Watcher Startup/Stop Scripts\n$NEEDS_WATCHER_SCRIPTS = $false\nif ($INSTALL_CLAUDE -or $INSTALL_OPENCLAW) {\n $NEEDS_WATCHER_SCRIPTS = $true\n}\n\nif ($NEEDS_WATCHER_SCRIPTS) {\n Write-Host ""\n Write-Host "๐Ÿ“ Creating watcher management scripts..."\n\n if ($INSTALL_CLAUDE) {\n $startScript = @\'\npkill -f "claude_watcher_client.ts" 2>/dev/null\nSet-Location "$env:USERPROFILE\\.skill-insight"\nStart-Process -FilePath "npx" -ArgumentList "-y", "tsx", "$env:USERPROFILE\\.skill-insight\\claude_watcher_client.ts" -RedirectStandardOutput "$env:USERPROFILE\\.skill-insight\\logs\\claude_watcher.log" -RedirectStandardError "$env:USERPROFILE\\.skill-insight\\logs\\claude_watcher_error.log" -NoNewWindow\nWrite-Host "Claude watcher started"\n\'@\n Set-Content -Path "$homeDir\\.skill-insight\\start_claude_watcher.ps1" -Value $startScript -Encoding UTF8\n\n $stopScript = @\'\nGet-Process | Where-Object { $_.CommandLine -like "*claude_watcher_client.ts*" } | Stop-Process -Force -ErrorAction SilentlyContinue\nRemove-Item "$env:USERPROFILE\\.skill-insight\\claude_watcher.pid" -Force -ErrorAction SilentlyContinue\nWrite-Host "Claude watcher stopped"\n\'@\n Set-Content -Path "$homeDir\\.skill-insight\\stop_claude_watcher.ps1" -Value $stopScript -Encoding UTF8\n }\n\n if ($INSTALL_OPENCLAW) {\n $startScript = @\'\npkill -f "openclaw_watcher_client.ts" 2>/dev/null\nSet-Location "$env:USERPROFILE\\.skill-insight"\nStart-Process -FilePath "npx" -ArgumentList "-y", "tsx", "$env:USERPROFILE\\.skill-insight\\openclaw_watcher_client.ts" -RedirectStandardOutput "$env:USERPROFILE\\.skill-insight\\logs\\openclaw_watcher.log" -RedirectStandardError "$env:USERPROFILE\\.skill-insight\\logs\\openclaw_watcher_error.log" -NoNewWindow\nWrite-Host "OpenClaw watcher started"\n\'@\n Set-Content -Path "$homeDir\\.skill-insight\\start_openclaw_watcher.ps1" -Value $startScript -Encoding UTF8\n\n $stopScript = @\'\nGet-Process | Where-Object { $_.CommandLine -like "*openclaw_watcher_client.ts*" } | Stop-Process -Force -ErrorAction SilentlyContinue\nRemove-Item "$env:USERPROFILE\\.skill-insight\\openclaw_watcher.pid" -Force -ErrorAction SilentlyContinue\nWrite-Host "OpenClaw watcher stopped"\n\'@\n Set-Content -Path "$homeDir\\.skill-insight\\stop_openclaw_watcher.ps1" -Value $stopScript -Encoding UTF8\n }\n\n $combinedStart = \'Write-Host "Starting Skill-Insight watchers..."\'\n if ($INSTALL_CLAUDE) { $combinedStart += [char]10 + "& `"$homeDir\\.skill-insight\\start_claude_watcher.ps1`"" }\n if ($INSTALL_OPENCLAW) { $combinedStart += [char]10 + "& `"$homeDir\\.skill-insight\\start_openclaw_watcher.ps1`"" }\n $combinedStart += [char]10 + \'Write-Host "All watchers started!"\'\n Set-Content -Path "$homeDir\\.skill-insight\\start_watchers.ps1" -Value $combinedStart -Encoding UTF8\n\n $combinedStop = \'Write-Host "Stopping Skill-Insight watchers..."\'\n if ($INSTALL_CLAUDE) { $combinedStop += [char]10 + "& `"$homeDir\\.skill-insight\\stop_claude_watcher.ps1`"" }\n if ($INSTALL_OPENCLAW) { $combinedStop += [char]10 + "& `"$homeDir\\.skill-insight\\stop_openclaw_watcher.ps1`"" }\n $combinedStop += [char]10 + \'Write-Host "All watchers stopped!"\'\n Set-Content -Path "$homeDir\\.skill-insight\\stop_watchers.ps1" -Value $combinedStop -Encoding UTF8\n}\n\n# 8. Start Watchers Now\nif ($NEEDS_WATCHER_SCRIPTS) {\n Write-Host ""\n Write-Host "๐Ÿš€ Starting telemetry watchers..."\n if (Get-Command npx -ErrorAction SilentlyContinue) {\n & "$homeDir\\.skill-insight\\start_watchers.ps1"\n } else {\n Write-Host "โš ๏ธ Node.js (npx) not found. Skipping watcher startup."\n }\n}\n\n# 10. Final Summary\nWrite-Host ""\nWrite-Host "๐ŸŒŸ Skill-Insight Telemetry: READY"\nWrite-Host "------------------------------------------------"\nWrite-Host "Installed Components:"\nif ($INSTALL_OPENCODE) { Write-Host " โœ… OpenCode Plugin: ~/.opencode/plugins/Witty-Skill-Insight.ts" }\nif ($INSTALL_CLAUDE) { Write-Host " โœ… Claude Watcher: ~/.skill-insight/claude_watcher_client.ts" }\nif ($INSTALL_OPENCLAW) { Write-Host " โœ… OpenClaw Watcher: ~/.skill-insight/openclaw_watcher_client.ts" }\n\nif ($NEEDS_WATCHER_SCRIPTS) {\n Write-Host ""\n Write-Host "Watcher Management:"\n Write-Host " Start all: ~/.skill-insight/start_watchers.ps1"\n Write-Host " Stop all: ~/.skill-insight/stop_watchers.ps1"\n Write-Host " Logs: ~/.skill-insight/logs/"\n}\n\nWrite-Host ""\nWrite-Host "Usage:"\nif ($INSTALL_OPENCODE) { Write-Host " 1. Run: opencode run \'hello\'" }\nif ($INSTALL_CLAUDE) { Write-Host " 2. Run: claude (restart terminal first)" }\nif ($INSTALL_OPENCLAW) { Write-Host " 3. OpenClaw will automatically monitor and upload telemetry" }\nWrite-Host "------------------------------------------------"'].join("\n");return new u.NextResponse(e,{headers:{"Content-Type":"text/plain; charset=utf-8"}})}{let e=["#!/bin/bash\n# =============================================================================\n# Skill-insight One-Click Setup\n# =============================================================================\n",'SKILL_INSIGHT_HOST="'+o+'"','SKILL_INSIGHT_BASE_URL="'+o+'"','\necho "๐Ÿš€ Fetching Skill-insight telemetry components from $SKILL_INSIGHT_BASE_URL..."\n\n# 1. Setup Directories\nmkdir -p "$HOME/.skill-insight"\nmkdir -p "$HOME/.skill-insight/logs"\nmkdir -p "$HOME/.opencode/plugins"\nmkdir -p "$HOME/.opencode/skills"\nmkdir -p "$HOME/.claude/projects"\nmkdir -p "$HOME/.openclaw/agents"\nmkdir -p ".opencode/skills"\necho "๐Ÿ“‚ Created necessary directories"\n\n# 2. Interactive Framework Selection with inquirer\necho ""\n\nSELECTOR_SCRIPT="$HOME/.skill-insight/framework_selector.mjs"\nSELECTOR_RESULT="$HOME/.skill-insight/.selector_result"\n\n# Install inquirer if not already installed\ncd "$HOME/.skill-insight"\nif [ ! -d "node_modules/inquirer" ]; then\n echo "๐Ÿ“ฆ Installing inquirer for interactive selection..."\n npm install inquirer --save 2>/dev/null\nfi\n\ncat > "$SELECTOR_SCRIPT" << \'SELECTOR_EOF\'\nimport inquirer from \'inquirer\';\nimport fs from \'fs\';\n\nconst frameworks = [\n { name: \'OpenCode\', value: \'opencode\' },\n { name: \'Claude Code\', value: \'claude\' },\n { name: \'OpenClaw\', value: \'openclaw\' }\n];\n\nasync function select() {\n console.log(\'\');\n console.log(\'\\x1b[36m%s\\x1b[0m\', \'โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—\');\n console.log(\'\\x1b[36m%s\\x1b[0m\', \'โ•‘ โ•‘\');\n console.log(\'\\x1b[1m\\x1b[36m%s\\x1b[0m\', \'โ•‘ โœจ Skill-insight โœจ โ•‘\');\n console.log(\'\\x1b[36m%s\\x1b[0m\', \'โ•‘ โ•‘\');\n console.log(\'\\x1b[36m%s\\x1b[0m\', \'โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•\');\n console.log(\'\');\n console.log(\'\\x1b[90m%s\\x1b[0m\', \' ๆ็คบ: โ†‘โ†“ ็งปๅŠจ | ็ฉบๆ ผ ้€‰ๆ‹ฉ | a ๅ…จ้€‰ | i ๅ้€‰ | Enter ็กฎ่ฎค\');\n console.log(\'\');\n\n const answers = await inquirer.prompt([\n {\n type: \'checkbox\',\n name: \'frameworks\',\n message: \'้›†ๆˆๅˆฐ๏ผš\',\n choices: frameworks,\n pageSize: 10,\n loop: false\n }\n ]);\n\n const selected = answers.frameworks;\n \n if (selected.length > 0) {\n console.log(\'\');\n console.log(\'\\x1b[32m%s\\x1b[0m\', \'โœ… ๅฐ†ๅฎ‰่ฃ…ไปฅไธ‹็ป„ไปถ:\');\n selected.forEach(fw => {\n const name = frameworks.find(f => f.value === fw)?.name || fw;\n console.log(\'\\x1b[32m%s\\x1b[0m\', \' โ€ข \' + name);\n });\n console.log(\'\');\n } else {\n console.log(\'\');\n console.log(\'\\x1b[33m%s\\x1b[0m\', \'โš ๏ธ ๆœช้€‰ๆ‹ฉไปปไฝ•็ป„ไปถ๏ผŒๅฐ†ไธ่ฟ›่กŒๅฎ‰่ฃ…ใ€‚\');\n console.log(\'\');\n }\n\n const resultFile = process.env.SELECTOR_RESULT_FILE || process.env.HOME + \'/.skill-insight/.selector_result\';\n fs.writeFileSync(resultFile, selected.join(\',\'));\n}\n\nselect().catch(err => {\n console.error(\'Error:\', err);\n process.exit(1);\n});\nSELECTOR_EOF\n\n# Run the selector interactively from /dev/tty\nexport SELECTOR_RESULT_FILE="$SELECTOR_RESULT"\ncd "$HOME/.skill-insight" && npx -y tsx "$SELECTOR_SCRIPT" < /dev/tty\n\n# Read the selection result from file\nif [ -f "$SELECTOR_RESULT" ]; then\n SELECTED_FRAMEWORKS=$(cat "$SELECTOR_RESULT")\n rm -f "$SELECTOR_RESULT"\nelse\n SELECTED_FRAMEWORKS=""\nfi\n\n# Set installation flags based on selection\nINSTALL_OPENCODE=false\nINSTALL_CLAUDE=false\nINSTALL_OPENCLAW=false\n\nif [[ "$SELECTED_FRAMEWORKS" == *"opencode"* ]]; then\n INSTALL_OPENCODE=true\nfi\nif [[ "$SELECTED_FRAMEWORKS" == *"claude"* ]]; then\n INSTALL_CLAUDE=true\nfi\nif [[ "$SELECTED_FRAMEWORKS" == *"openclaw"* ]]; then\n INSTALL_OPENCLAW=true\nfi\n\n# Exit if nothing selected\nif [ "$INSTALL_OPENCODE" = "false" ] && [ "$INSTALL_CLAUDE" = "false" ] && [ "$INSTALL_OPENCLAW" = "false" ]; then\n echo "โš ๏ธ ๆœช้€‰ๆ‹ฉไปปไฝ•ๆก†ๆžถ็ป„ไปถ๏ผŒๅฐ†่ทณ่ฟ‡ๆ’ไปถๅฎ‰่ฃ…ใ€‚"\n echo " ็ปง็ปญๆ‰ง่กŒ้…็ฝฎๆญฅ้ชค..."\n echo ""\nfi\n\n# 3. Download Components\nif [ "$INSTALL_OPENCODE" = "true" ]; then\n echo "โฌ Downloading OpenCode Plugin..."\n curl -sSf "$SKILL_INSIGHT_BASE_URL/api/setup/opencode" -o "$HOME/.opencode/plugins/Witty-Skill-Insight.ts"\nfi\n\nif [ "$INSTALL_CLAUDE" = "true" ]; then\n echo "โฌ Downloading Claude Code Watcher..."\n curl -sSf "$SKILL_INSIGHT_BASE_URL/api/setup/claude-watcher" -o "$HOME/.skill-insight/claude_watcher_client.ts"\nfi\n\nif [ "$INSTALL_OPENCLAW" = "true" ]; then\n echo "โฌ Downloading OpenClaw Watcher..."\n curl -sSf "$SKILL_INSIGHT_BASE_URL/api/setup/openclaw-watcher" -o "$HOME/.skill-insight/openclaw_watcher_client.ts"\nfi\n\n# 4. Configure ~/.skill-insight/.env\nSKILL_INSIGHT_CONFIG_FILE="$HOME/.skill-insight/.env"\nEXISTING_KEY=""\nEXISTING_HOST=""\nif [ -f "$SKILL_INSIGHT_CONFIG_FILE" ]; then\n EXISTING_KEY=$(grep \'^SKILL_INSIGHT_API_KEY=\' "$SKILL_INSIGHT_CONFIG_FILE" | head -n 1 | cut -d\'=\' -f2-)\n EXISTING_HOST=$(grep \'^SKILL_INSIGHT_HOST=\' "$SKILL_INSIGHT_CONFIG_FILE" | head -n 1 | cut -d\'=\' -f2-)\nfi\n\n# -- API Key Logic --\nFINAL_KEY="$EXISTING_KEY"\nif [ -n "$EXISTING_KEY" ]; then\n echo "๐Ÿ”‘ Found existing API Key."\n read -p "๐Ÿ‘‰ Use existing key? (y/N, Default: y): " USE_EXISTING < /dev/tty\n if [[ "$USE_EXISTING" =~ ^[Nn]$ ]]; then\n read -p "๐Ÿ‘‰ Please enter your NEW API Key: " FINAL_KEY < /dev/tty\n fi\nelse\n echo "๐Ÿ”‘ SKILL_INSIGHT_API_KEY is not set."\n read -p "๐Ÿ‘‰ Please enter your API Key: " FINAL_KEY < /dev/tty\nfi\n\n# -- Host Logic --\nFINAL_HOST="$SKILL_INSIGHT_HOST"\nif [ -n "$EXISTING_HOST" ] && [ "$EXISTING_HOST" != "$SKILL_INSIGHT_HOST" ]; then\n echo "๐ŸŒ Current Host in config: $EXISTING_HOST"\n echo "๐ŸŒ New Host detected: $SKILL_INSIGHT_HOST"\n read -p "๐Ÿ‘‰ Change to new Host? (y/N, Default: y): " CHANGE_HOST < /dev/tty\n if [[ "$CHANGE_HOST" =~ ^[Nn]$ ]]; then\n FINAL_HOST="$EXISTING_HOST"\n fi\nelif [ -z "$EXISTING_HOST" ]; then\n FINAL_HOST="$SKILL_INSIGHT_HOST"\nfi\n\nif [ -z "$FINAL_KEY" ]; then\n echo "โš ๏ธ Warning: No API Key provided. Telemetry upload will fail until you set it in $SKILL_INSIGHT_CONFIG_FILE"\nfi\n\necho "โš™๏ธ Updating configuration..."\ntouch "$SKILL_INSIGHT_CONFIG_FILE"\ncp "$SKILL_INSIGHT_CONFIG_FILE" "${SKILL_INSIGHT_CONFIG_FILE}.bak"\ngrep -v "^SKILL_INSIGHT_HOST=" "${SKILL_INSIGHT_CONFIG_FILE}.bak" | grep -v "^SKILL_INSIGHT_API_KEY=" > "$SKILL_INSIGHT_CONFIG_FILE"\necho "SKILL_INSIGHT_HOST=$FINAL_HOST" >> "$SKILL_INSIGHT_CONFIG_FILE"\necho "SKILL_INSIGHT_API_KEY=$FINAL_KEY" >> "$SKILL_INSIGHT_CONFIG_FILE"\nrm "${SKILL_INSIGHT_CONFIG_FILE}.bak"\necho "โœ… Configuration updated at $SKILL_INSIGHT_CONFIG_FILE"\n\n# 6. Install Watcher Dependencies\nif [ "$INSTALL_CLAUDE" = "true" ] || [ "$INSTALL_OPENCLAW" = "true" ]; then\n echo ""\n echo "๐Ÿ“ฆ Installing watcher dependencies..."\n if command -v npm &> /dev/null; then\n cd "$HOME/.skill-insight"\n if [ ! -f "package.json" ]; then\n echo \'{"name": "skill-insight-watcher", "version": "1.0.0", "type": "module", "dependencies": {}}\' > package.json\n fi\n npm install chokidar --save 2>/dev/null\n echo "โœ… Dependencies installed"\n else\n echo "โš ๏ธ npm not found. Skipping dependency installation."\n fi\nfi\n\n# 7. Create Watcher Startup/Stop Scripts\nNEEDS_WATCHER_SCRIPTS=false\nif [ "$INSTALL_CLAUDE" = "true" ] || [ "$INSTALL_OPENCLAW" = "true" ]; then\n NEEDS_WATCHER_SCRIPTS=true\nfi\n\nif [ "$NEEDS_WATCHER_SCRIPTS" = "true" ]; then\n echo ""\n echo "๐Ÿ“ Creating watcher management scripts..."\n\n if [ "$INSTALL_CLAUDE" = "true" ]; then\n cat > "$HOME/.skill-insight/start_claude_watcher.sh" << \'WATCHER_EOF\'\n#!/bin/bash\npkill -f "claude_watcher_client.ts" 2>/dev/null\ncd "$HOME/.skill-insight" && nohup npx -y tsx "$HOME/.skill-insight/claude_watcher_client.ts" > "$HOME/.skill-insight/logs/claude_watcher.log" 2>&1 &\necho $! > "$HOME/.skill-insight/claude_watcher.pid"\necho "Claude watcher started with PID $(cat $HOME/.skill-insight/claude_watcher.pid)"\nWATCHER_EOF\n chmod +x "$HOME/.skill-insight/start_claude_watcher.sh"\n\n cat > "$HOME/.skill-insight/stop_claude_watcher.sh" << \'STOP_CLAUDE_EOF\'\n#!/bin/bash\npkill -f "claude_watcher_client.ts" 2>/dev/null\nrm -f "$HOME/.skill-insight/claude_watcher.pid"\necho "Claude watcher stopped"\nSTOP_CLAUDE_EOF\n chmod +x "$HOME/.skill-insight/stop_claude_watcher.sh"\n fi\n\n if [ "$INSTALL_OPENCLAW" = "true" ]; then\n cat > "$HOME/.skill-insight/start_openclaw_watcher.sh" << \'WATCHER_EOF\'\n#!/bin/bash\npkill -f "openclaw_watcher_client.ts" 2>/dev/null\ncd "$HOME/.skill-insight" && nohup npx -y tsx "$HOME/.skill-insight/openclaw_watcher_client.ts" > "$HOME/.skill-insight/logs/openclaw_watcher.log" 2>&1 &\necho $! > "$HOME/.skill-insight/openclaw_watcher.pid"\necho "OpenClaw watcher started with PID $(cat $HOME/.skill-insight/openclaw_watcher.pid)"\nWATCHER_EOF\n chmod +x "$HOME/.skill-insight/start_openclaw_watcher.sh"\n\n cat > "$HOME/.skill-insight/stop_openclaw_watcher.sh" << \'STOP_OPENCLAW_EOF\'\n#!/bin/bash\npkill -f "openclaw_watcher_client.ts" 2>/dev/null\nrm -f "$HOME/.skill-insight/openclaw_watcher.pid"\necho "OpenClaw watcher stopped"\nSTOP_OPENCLAW_EOF\n chmod +x "$HOME/.skill-insight/stop_openclaw_watcher.sh"\n fi\n\n cat > "$HOME/.skill-insight/start_watchers.sh" << \'WATCHER_HEADER\'\n#!/bin/bash\necho "Starting Skill-Insight watchers..."\nWATCHER_HEADER\n if [ "$INSTALL_CLAUDE" = "true" ]; then echo \'"$HOME/.skill-insight/start_claude_watcher.sh"\' >> "$HOME/.skill-insight/start_watchers.sh"; fi\n if [ "$INSTALL_OPENCLAW" = "true" ]; then echo \'"$HOME/.skill-insight/start_openclaw_watcher.sh"\' >> "$HOME/.skill-insight/start_watchers.sh"; fi\n echo \'echo "All watchers started!"\' >> "$HOME/.skill-insight/start_watchers.sh"\n chmod +x "$HOME/.skill-insight/start_watchers.sh"\n\n cat > "$HOME/.skill-insight/stop_watchers.sh" << \'STOP_HEADER\'\n#!/bin/bash\necho "Stopping Skill-Insight watchers..."\nSTOP_HEADER\n if [ "$INSTALL_CLAUDE" = "true" ]; then echo \'"$HOME/.skill-insight/stop_claude_watcher.sh"\' >> "$HOME/.skill-insight/stop_watchers.sh"; fi\n if [ "$INSTALL_OPENCLAW" = "true" ]; then echo \'"$HOME/.skill-insight/stop_openclaw_watcher.sh"\' >> "$HOME/.skill-insight/stop_watchers.sh"; fi\n echo \'echo "All watchers stopped!"\' >> "$HOME/.skill-insight/stop_watchers.sh"\n chmod +x "$HOME/.skill-insight/stop_watchers.sh"\nfi\n\n# 8. Start Watchers Now\nif [ "$NEEDS_WATCHER_SCRIPTS" = "true" ]; then\n echo ""\n echo "๐Ÿš€ Starting telemetry watchers..."\n if command -v npx &> /dev/null; then\n "$HOME/.skill-insight/start_watchers.sh"\n else\n echo "โš ๏ธ Node.js (npx) not found. Skipping watcher startup."\n fi\nfi\n\n# 10. Final Summary\necho ""\necho "๐ŸŒŸ Skill-Insight Telemetry: READY"\necho "------------------------------------------------"\necho "Installed Components:"\nif [ "$INSTALL_OPENCODE" = "true" ]; then echo " โœ… OpenCode Plugin: ~/.opencode/plugins/Witty-Skill-Insight.ts"; fi\nif [ "$INSTALL_CLAUDE" = "true" ]; then echo " โœ… Claude Watcher: ~/.skill-insight/claude_watcher_client.ts"; fi\nif [ "$INSTALL_OPENCLAW" = "true" ]; then echo " โœ… OpenClaw Watcher: ~/.skill-insight/openclaw_watcher_client.ts"; fi\n\nif [ "$NEEDS_WATCHER_SCRIPTS" = "true" ]; then\n echo ""\n echo "Watcher Management:"\n echo " Start all: ~/.skill-insight/start_watchers.sh"\n echo " Stop all: ~/.skill-insight/stop_watchers.sh"\n echo " Logs: ~/.skill-insight/logs/"\nfi\n\necho ""\necho "Usage:"\nif [ "$INSTALL_OPENCODE" = "true" ]; then echo " 1. Run: opencode run \'hello\'"; fi\nif [ "$INSTALL_CLAUDE" = "true" ]; then echo " 2. Run: claude (restart terminal first)"; fi\nif [ "$INSTALL_OPENCLAW" = "true" ]; then echo " 3. OpenClaw will automatically monitor and upload telemetry"; fi\necho "------------------------------------------------"'].join("\n");return new u.NextResponse(e,{headers:{"Content-Type":"text/x-shellscript"}})}}e.s(["GET",()=>T],21965);var $=e.i(21965);let N=new n.AppRouteRouteModule({definition:{kind:t.RouteKind.APP_ROUTE,page:"/api/setup/route",pathname:"/api/setup",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/setup/route.ts",nextConfigOutput:"standalone",userland:$}),{workAsyncStorage:g,workUnitAsyncStorage:O,serverHooks:C}=N;function m(){return(0,i.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:O})}async function w(e,n,i){N.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let u="/api/setup/route";u=u.replace(/\/index$/,"")||"/";let T=await N.prepare(e,n,{srcPage:u,multiZoneDraftMode:!1});if(!T)return n.statusCode=400,n.end("Bad Request"),null==i.waitUntil||i.waitUntil.call(i,Promise.resolve()),null;let{buildId:$,params:g,nextConfig:O,parsedUrl:C,isDraftMode:m,prerenderManifest:w,routerServerContext:H,isOnDemandRevalidate:f,revalidateOnlyGenerated:A,resolvedPathname:R,clientReferenceManifest:k,serverActionsManifest:F}=T,P=(0,r.normalizeAppPath)(u),W=!!(w.dynamicRoutes[P]||w.routes[R]),G=async()=>((null==H?void 0:H.render404)?await H.render404(e,n,C,!1):n.end("This page could not be found"),null);if(W&&!m){let e=!!w.routes[R],n=w.dynamicRoutes[P];if(n&&!1===n.fallback&&!e){if(O.experimental.adapterPath)return await G();throw new d.NoFallbackError}}let D=null;!W||N.isDev||m||(D="/index"===(D=R)?"/":D);let y=!0===N.isDev||!W,K=W&&!y;F&&k&&(0,l.setManifestsSingleton)({page:u,clientReferenceManifest:k,serverActionsManifest:F});let v=e.method||"GET",x=(0,o.getTracer)(),b=x.getActiveScopeSpan(),U={params:g,prerenderManifest:w,renderOpts:{experimental:{authInterrupts:!!O.experimental.authInterrupts},cacheComponents:!!O.cacheComponents,supportsDynamicResponse:y,incrementalCache:(0,s.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:O.cacheLife,waitUntil:i.waitUntil,onClose:e=>{n.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(n,t,i,s)=>N.onRequestError(e,n,i,s,H)},sharedContext:{buildId:$}},M=new a.NodeNextRequest(e),q=new a.NodeNextResponse(n),X=c.NextRequestAdapter.fromNodeNextRequest(M,(0,c.signalFromNodeResponse)(n));try{let l=async e=>N.handle(X,U).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":n.statusCode,"next.rsc":!1});let t=x.getRootSpanAttributes();if(!t)return;if(t.get("next.span_type")!==h.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${t.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let i=t.get("next.route");if(i){let n=`${v} ${i}`;e.setAttributes({"next.route":i,"http.route":i,"next.span_name":n}),e.updateName(n)}else e.updateName(`${v} ${u}`)}),r=!!(0,s.getRequestMeta)(e,"minimalMode"),a=async s=>{var o,a;let c=async({previousCacheEntry:t})=>{try{if(!r&&f&&A&&!t)return n.statusCode=404,n.setHeader("x-nextjs-cache","REVALIDATED"),n.end("This page could not be found"),null;let o=await l(s);e.fetchMetrics=U.renderOpts.fetchMetrics;let a=U.renderOpts.pendingWaitUntil;a&&i.waitUntil&&(i.waitUntil(a),a=void 0);let c=U.renderOpts.collectedTags;if(!W)return await (0,_.sendResponse)(M,q,o,U.renderOpts.pendingWaitUntil),null;{let e=await o.blob(),n=(0,I.toNodeOutgoingHttpHeaders)(o.headers);c&&(n[L.NEXT_CACHE_TAGS_HEADER]=c),!n["content-type"]&&e.type&&(n["content-type"]=e.type);let t=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=L.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,i=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=L.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:p.CachedRouteKind.APP_ROUTE,status:o.status,body:Buffer.from(await e.arrayBuffer()),headers:n},cacheControl:{revalidate:t,expire:i}}}}catch(n){throw(null==t?void 0:t.isStale)&&await N.onRequestError(e,n,{routerKind:"App Router",routePath:u,routeType:"route",revalidateReason:(0,S.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:f})},!1,H),n}},h=await N.handleResponse({req:e,nextConfig:O,cacheKey:D,routeKind:t.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:w,isRoutePPREnabled:!1,isOnDemandRevalidate:f,revalidateOnlyGenerated:A,responseGenerator:c,waitUntil:i.waitUntil,isMinimalMode:r});if(!W)return null;if((null==h||null==(o=h.value)?void 0:o.kind)!==p.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==h||null==(a=h.value)?void 0:a.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});r||n.setHeader("x-nextjs-cache",f?"REVALIDATED":h.isMiss?"MISS":h.isStale?"STALE":"HIT"),m&&n.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,I.fromNodeOutgoingHttpHeaders)(h.value.headers);return r&&W||d.delete(L.NEXT_CACHE_TAGS_HEADER),!h.cacheControl||n.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,E.getCacheControlHeader)(h.cacheControl)),await (0,_.sendResponse)(M,q,new Response(h.value.body,{headers:d,status:h.value.status||200})),null};b?await a(b):await x.withPropagatedContext(e.headers,()=>x.trace(h.BaseServerSpan.handleRequest,{spanName:`${v} ${u}`,kind:o.SpanKind.SERVER,attributes:{"http.method":v,"http.target":e.url}},a))}catch(n){if(n instanceof d.NoFallbackError||await N.onRequestError(e,n,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,S.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:f})},!1,H),W)throw n;return await (0,_.sendResponse)(M,q,new Response(null,{status:500})),null}}e.s(["handler",()=>w,"patchFetch",()=>m,"routeModule",()=>N,"serverHooks",()=>C,"workAsyncStorage",()=>g,"workUnitAsyncStorage",()=>O],26984)}];
401
2
 
402
3
  //# sourceMappingURL=node_modules_next_dist_esm_build_templates_app-route_f42faeee.js.map