@witty-ai/skill-insight 0.5.0-beta → 0.7.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 (303) hide show
  1. package/.env.example +6 -0
  2. package/.next/standalone/.next/BUILD_ID +1 -1
  3. package/.next/standalone/.next/app-path-routes-manifest.json +4 -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 +24 -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/config/create/route.js +4 -3
  25. package/.next/standalone/.next/server/app/api/config/create/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/config/route.js +5 -4
  27. package/.next/standalone/.next/server/app/api/config/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/data/route.js +6 -5
  29. package/.next/standalone/.next/server/app/api/data/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/evaluation/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/otel/v1/logs/route.js +6 -5
  32. package/.next/standalone/.next/server/app/api/otel/v1/logs/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/otel/v1/traces/route.js +4 -3
  34. package/.next/standalone/.next/server/app/api/otel/v1/traces/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/proxy/[taskId]/[...path]/route.js +1 -1
  36. package/.next/standalone/.next/server/app/api/proxy/[taskId]/end/route.js +4 -3
  37. package/.next/standalone/.next/server/app/api/proxy/[taskId]/end/route.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/api/rejudge/route.js +6 -5
  39. package/.next/standalone/.next/server/app/api/rejudge/route.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/api/session/route.js +4 -4
  41. package/.next/standalone/.next/server/app/api/session/route.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route/app-paths-manifest.json +3 -0
  43. package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route/build-manifest.json +11 -0
  44. package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route/server-reference-manifest.json +4 -0
  45. package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route.js +6 -0
  46. package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route.js.map +5 -0
  47. package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route.js.nft.json +1 -0
  48. package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route_client-reference-manifest.js +2 -0
  49. package/.next/standalone/.next/server/app/api/setup/opencode-tui/route/app-paths-manifest.json +3 -0
  50. package/.next/standalone/.next/server/app/api/setup/opencode-tui/route/build-manifest.json +11 -0
  51. package/.next/standalone/.next/server/app/api/setup/opencode-tui/route/server-reference-manifest.json +4 -0
  52. package/.next/standalone/.next/server/app/api/setup/opencode-tui/route.js +6 -0
  53. package/.next/standalone/.next/server/app/api/setup/opencode-tui/route.js.map +5 -0
  54. package/.next/standalone/.next/server/app/api/setup/opencode-tui/route.js.nft.json +1 -0
  55. package/.next/standalone/.next/server/app/api/setup/opencode-tui/route_client-reference-manifest.js +2 -0
  56. package/.next/standalone/.next/server/app/api/skills/[id]/versions/[version]/download/route.js.nft.json +1 -1
  57. package/.next/standalone/.next/server/app/api/skills/[id]/versions/[version]/route.js +3 -2
  58. package/.next/standalone/.next/server/app/api/skills/[id]/versions/[version]/route.js.nft.json +1 -1
  59. package/.next/standalone/.next/server/app/api/skills/[id]/versions/route.js +5 -2
  60. package/.next/standalone/.next/server/app/api/skills/[id]/versions/route.js.nft.json +1 -1
  61. package/.next/standalone/.next/server/app/api/skills/automation/import/route.js +5 -2
  62. package/.next/standalone/.next/server/app/api/skills/automation/import/route.js.nft.json +1 -1
  63. package/.next/standalone/.next/server/app/api/skills/logs/route.js +6 -5
  64. package/.next/standalone/.next/server/app/api/skills/logs/route.js.nft.json +1 -1
  65. package/.next/standalone/.next/server/app/api/skills/route.js +3 -2
  66. package/.next/standalone/.next/server/app/api/skills/route.js.nft.json +1 -1
  67. package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route/app-paths-manifest.json +3 -0
  68. package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route/build-manifest.json +11 -0
  69. package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route/server-reference-manifest.json +4 -0
  70. package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route.js +8 -0
  71. package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route.js.map +5 -0
  72. package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route.js.nft.json +1 -0
  73. package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route_client-reference-manifest.js +2 -0
  74. package/.next/standalone/.next/server/app/api/skills/upload/route.js +5 -2
  75. package/.next/standalone/.next/server/app/api/skills/upload/route.js.nft.json +1 -1
  76. package/.next/standalone/.next/server/app/api/task-stats/route/app-paths-manifest.json +3 -0
  77. package/.next/standalone/.next/server/app/api/task-stats/route/build-manifest.json +11 -0
  78. package/.next/standalone/.next/server/app/api/task-stats/route/server-reference-manifest.json +4 -0
  79. package/.next/standalone/.next/server/app/api/task-stats/route.js +12 -0
  80. package/.next/standalone/.next/server/app/api/task-stats/route.js.map +5 -0
  81. package/.next/standalone/.next/server/app/api/task-stats/route.js.nft.json +1 -0
  82. package/.next/standalone/.next/server/app/api/task-stats/route_client-reference-manifest.js +2 -0
  83. package/.next/standalone/.next/server/app/api/upload/route.js +5 -4
  84. package/.next/standalone/.next/server/app/api/upload/route.js.nft.json +1 -1
  85. package/.next/standalone/.next/server/app/details/page/react-loadable-manifest.json +2 -2
  86. package/.next/standalone/.next/server/app/details/page.js.nft.json +1 -1
  87. package/.next/standalone/.next/server/app/details/page_client-reference-manifest.js +1 -1
  88. package/.next/standalone/.next/server/app/details.html +1 -1
  89. package/.next/standalone/.next/server/app/details.rsc +5 -5
  90. package/.next/standalone/.next/server/app/details.segments/_full.segment.rsc +5 -5
  91. package/.next/standalone/.next/server/app/details.segments/_head.segment.rsc +1 -1
  92. package/.next/standalone/.next/server/app/details.segments/_index.segment.rsc +3 -3
  93. package/.next/standalone/.next/server/app/details.segments/_tree.segment.rsc +2 -2
  94. package/.next/standalone/.next/server/app/details.segments/details/__PAGE__.segment.rsc +2 -2
  95. package/.next/standalone/.next/server/app/details.segments/details.segment.rsc +1 -1
  96. package/.next/standalone/.next/server/app/index.html +1 -1
  97. package/.next/standalone/.next/server/app/index.rsc +5 -5
  98. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  99. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +5 -5
  100. package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  101. package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +3 -3
  102. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  103. package/.next/standalone/.next/server/app/login/page.js.nft.json +1 -1
  104. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  105. package/.next/standalone/.next/server/app/login.html +1 -1
  106. package/.next/standalone/.next/server/app/login.rsc +5 -5
  107. package/.next/standalone/.next/server/app/login.segments/_full.segment.rsc +5 -5
  108. package/.next/standalone/.next/server/app/login.segments/_head.segment.rsc +1 -1
  109. package/.next/standalone/.next/server/app/login.segments/_index.segment.rsc +3 -3
  110. package/.next/standalone/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  111. package/.next/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  112. package/.next/standalone/.next/server/app/login.segments/login.segment.rsc +1 -1
  113. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  114. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  115. package/.next/standalone/.next/server/app/skills/page.js.nft.json +1 -1
  116. package/.next/standalone/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  117. package/.next/standalone/.next/server/app/skills.html +1 -1
  118. package/.next/standalone/.next/server/app/skills.rsc +5 -5
  119. package/.next/standalone/.next/server/app/skills.segments/_full.segment.rsc +5 -5
  120. package/.next/standalone/.next/server/app/skills.segments/_head.segment.rsc +1 -1
  121. package/.next/standalone/.next/server/app/skills.segments/_index.segment.rsc +3 -3
  122. package/.next/standalone/.next/server/app/skills.segments/_tree.segment.rsc +2 -2
  123. package/.next/standalone/.next/server/app/skills.segments/skills/__PAGE__.segment.rsc +2 -2
  124. package/.next/standalone/.next/server/app/skills.segments/skills.segment.rsc +1 -1
  125. package/.next/standalone/.next/server/app-paths-manifest.json +4 -0
  126. package/.next/standalone/.next/server/chunks/[root-of-the-server]__02ddba88._.js +1 -1
  127. package/.next/standalone/.next/server/chunks/[root-of-the-server]__15dbd1f2._.js +3 -0
  128. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1c95bcde._.js +1 -1
  129. package/.next/standalone/.next/server/chunks/[root-of-the-server]__23efcd78._.js +3 -0
  130. package/.next/standalone/.next/server/chunks/[root-of-the-server]__4a6d443b._.js +1 -1
  131. package/.next/standalone/.next/server/chunks/[root-of-the-server]__53775b48._.js +1 -1
  132. package/.next/standalone/.next/server/chunks/[root-of-the-server]__5444db55._.js +1 -1
  133. package/.next/standalone/.next/server/chunks/[root-of-the-server]__591248f3._.js +1 -1
  134. package/.next/standalone/.next/server/chunks/[root-of-the-server]__5d8178f6._.js +1 -1
  135. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6261d672._.js +3 -0
  136. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6923eecf._.js +1 -1
  137. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6fc12878._.js +1 -1
  138. package/.next/standalone/.next/server/chunks/[root-of-the-server]__8402dfd1._.js +3 -0
  139. package/.next/standalone/.next/server/chunks/[root-of-the-server]__863cf6de._.js +1 -1
  140. package/.next/standalone/.next/server/chunks/[root-of-the-server]__89404730._.js +3 -0
  141. package/.next/standalone/.next/server/chunks/[root-of-the-server]__98b3de5e._.js +1 -1
  142. package/.next/standalone/.next/server/chunks/[root-of-the-server]__9d551ea2._.js +1 -1
  143. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a4d3d791._.js +1 -1
  144. package/.next/standalone/.next/server/chunks/[root-of-the-server]__aa3d72e3._.js +3 -0
  145. package/.next/standalone/.next/server/chunks/[root-of-the-server]__aa5c8858._.js +2 -2
  146. package/.next/standalone/.next/server/chunks/[root-of-the-server]__b11acc79._.js +1 -1
  147. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ba01f286._.js +1 -1
  148. package/.next/standalone/.next/server/chunks/[root-of-the-server]__bd91659b._.js +1 -1
  149. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c200214a._.js +1 -1
  150. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c20da96a._.js +3 -0
  151. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c602c518._.js +3 -0
  152. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d7fab946._.js +1 -1
  153. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d8c1808b._.js +1 -1
  154. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d9b9fecc._.js +1 -1
  155. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ddf63a21._.js +3 -0
  156. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e280561d._.js +1 -1
  157. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e550423c._.js +1 -1
  158. package/.next/standalone/.next/server/chunks/[root-of-the-server]__f9e66e02._.js +3 -0
  159. package/.next/standalone/.next/server/chunks/_33c0c729._.js +1 -1
  160. package/.next/standalone/.next/server/chunks/_3e8b4d8c._.js +1 -1
  161. package/.next/standalone/.next/server/chunks/_46f10554._.js +3 -0
  162. package/.next/standalone/.next/server/chunks/_4c806e26._.js +3 -0
  163. package/.next/standalone/.next/server/chunks/_cd3d20ca._.js +1 -1
  164. package/.next/standalone/.next/server/chunks/_ddffef3e._.js +1 -1
  165. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_setup_opencode-tui_route_actions_fc8ae29f.js +3 -0
  166. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_skills_sync-enterprise_route_actions_0ca45899.js +3 -0
  167. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_task-stats_route_actions_983505cd.js +3 -0
  168. package/.next/standalone/.next/server/chunks/ce889_server_app_api_setup_opencode-commands_si-optimizer_route_actions_fcde30ef.js +3 -0
  169. package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_c33286ed.js +47 -4
  170. package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_f42faeee.js +1 -1
  171. package/.next/standalone/.next/server/chunks/src_98433cb8._.js +237 -0
  172. package/.next/standalone/.next/server/chunks/src_c8971a2d._.js +57 -8
  173. package/.next/standalone/.next/server/chunks/src_lib_119f6c7b._.js +3 -0
  174. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__9ab7cc4a._.js → [root-of-the-server]__082c32a2._.js} +2 -2
  175. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__51073007._.js +1 -1
  176. package/.next/standalone/.next/server/chunks/ssr/_049876f0._.js +1 -1
  177. package/.next/standalone/.next/server/chunks/ssr/_09546b95._.js +1 -1
  178. package/.next/standalone/.next/server/chunks/ssr/_8f5379ab._.js +1 -1
  179. package/.next/standalone/.next/server/chunks/ssr/_c8c8c083._.js +9 -9
  180. package/.next/standalone/.next/server/chunks/ssr/{_b121f1ae._.js → _e2faf4f5._.js} +2 -2
  181. package/.next/standalone/.next/server/chunks/ssr/_fd46f439._.js +2 -1
  182. package/.next/standalone/.next/server/chunks/ssr/node_modules_dagre-d3-es_src_dagre_index_3582f3d0.js +1 -1
  183. package/.next/standalone/.next/server/chunks/ssr/node_modules_lodash-es_a1341fea._.js +1 -1
  184. package/.next/standalone/.next/server/chunks/ssr/node_modules_lodash-es_e1de6ed8._.js +1 -1
  185. package/.next/standalone/.next/server/chunks/ssr/src_66a70595._.js +1 -1
  186. package/.next/standalone/.next/server/chunks/ssr/src_app_login_page_tsx_72f58654._.js +1 -1
  187. package/.next/standalone/.next/server/pages/404.html +1 -1
  188. package/.next/standalone/.next/server/pages/500.html +2 -2
  189. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  190. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  191. package/.next/standalone/.next/static/chunks/{737b8cff3c6a4e30.js → 015467355d3866a3.js} +1 -1
  192. package/.next/standalone/.next/static/chunks/09f192c9b0609ad8.js +1 -0
  193. package/.next/standalone/.next/static/chunks/1945a5514fbc393c.css +1 -0
  194. package/.next/{static/chunks/07c9f28a269c701a.js → standalone/.next/static/chunks/361e4cf1e9a71ccb.js} +1 -1
  195. package/.next/{static/chunks/5432ce4a494bc74d.js → standalone/.next/static/chunks/60bc50374fd32f20.js} +3 -3
  196. package/.next/standalone/.next/static/chunks/{251551dcdf74a60d.js → 65bac0880a87bff3.js} +1 -1
  197. package/.next/standalone/.next/static/chunks/961f7fa606dd26a8.js +1 -0
  198. package/.next/standalone/.next/static/chunks/bab2ffd4f527acfb.js +1 -0
  199. package/.next/standalone/.next/static/chunks/c513373e5cfedd5b.js +2 -0
  200. package/.next/standalone/.next/static/chunks/ca3017e51e817855.js +1 -0
  201. package/.next/{static/chunks/7e35f4cf2e266022.js → standalone/.next/static/chunks/cb104c3cb4c52833.js} +1 -1
  202. package/.next/{static/chunks/ff6357067630b168.js → standalone/.next/static/chunks/e13d208072a48316.js} +1 -1
  203. package/.next/standalone/.next/static/chunks/{e09d9ee16fe90255.js → f786bb68e17b12b4.js} +1 -1
  204. package/.next/standalone/.next/static/chunks/fc61b990c5ec4ef4.js +109 -0
  205. package/.next/standalone/node_modules/.prisma/client/edge.js +7 -3
  206. package/.next/standalone/node_modules/.prisma/client/index-browser.js +4 -0
  207. package/.next/standalone/node_modules/.prisma/client/index.js +7 -3
  208. package/.next/standalone/node_modules/.prisma/client/package.json +1 -1
  209. package/.next/standalone/node_modules/.prisma/client/schema.prisma +26 -22
  210. package/.next/standalone/node_modules/.prisma/client/wasm.js +4 -0
  211. package/.next/standalone/node_modules/adm-zip/util/constants.js +142 -0
  212. package/.next/standalone/node_modules/adm-zip/util/decoder.js +5 -0
  213. package/.next/standalone/node_modules/adm-zip/util/errors.js +63 -0
  214. package/.next/standalone/node_modules/adm-zip/util/fattr.js +76 -0
  215. package/.next/standalone/node_modules/adm-zip/util/index.js +5 -0
  216. package/.next/standalone/node_modules/adm-zip/util/utils.js +339 -0
  217. package/.next/standalone/package.json +6 -2
  218. package/.next/standalone/prisma/schema.prisma +7 -3
  219. package/.next/standalone/scripts/opencode_plugin.ts +158 -50
  220. package/.next/standalone/scripts/opencode_tui_plugin.tsx +308 -0
  221. package/.next/standalone/scripts/si-optimizer.md +5 -0
  222. package/.next/static/chunks/{737b8cff3c6a4e30.js → 015467355d3866a3.js} +1 -1
  223. package/.next/static/chunks/09f192c9b0609ad8.js +1 -0
  224. package/.next/static/chunks/1945a5514fbc393c.css +1 -0
  225. package/.next/{standalone/.next/static/chunks/07c9f28a269c701a.js → static/chunks/361e4cf1e9a71ccb.js} +1 -1
  226. package/.next/{standalone/.next/static/chunks/5432ce4a494bc74d.js → static/chunks/60bc50374fd32f20.js} +3 -3
  227. package/.next/static/chunks/{251551dcdf74a60d.js → 65bac0880a87bff3.js} +1 -1
  228. package/.next/static/chunks/961f7fa606dd26a8.js +1 -0
  229. package/.next/static/chunks/bab2ffd4f527acfb.js +1 -0
  230. package/.next/static/chunks/c513373e5cfedd5b.js +2 -0
  231. package/.next/static/chunks/ca3017e51e817855.js +1 -0
  232. package/.next/{standalone/.next/static/chunks/7e35f4cf2e266022.js → static/chunks/cb104c3cb4c52833.js} +1 -1
  233. package/.next/{standalone/.next/static/chunks/ff6357067630b168.js → static/chunks/e13d208072a48316.js} +1 -1
  234. package/.next/static/chunks/{e09d9ee16fe90255.js → f786bb68e17b12b4.js} +1 -1
  235. package/.next/static/chunks/fc61b990c5ec4ef4.js +109 -0
  236. package/package.json +6 -2
  237. package/prisma/schema.prisma +7 -3
  238. package/scripts/activate_telemetry.sh +44 -1
  239. package/scripts/opencode_plugin.ts +158 -50
  240. package/scripts/opencode_tui_plugin.tsx +308 -0
  241. package/scripts/si-optimizer.md +5 -0
  242. package/scripts/utils.js +0 -1
  243. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1013b265._.js +0 -3
  244. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1ce5e3b8._.js +0 -3
  245. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6d8053e2._.js +0 -3
  246. package/.next/standalone/.next/server/chunks/[root-of-the-server]__b835ea7f._.js +0 -3
  247. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e2f0baee._.js +0 -3
  248. package/.next/standalone/.next/server/chunks/[root-of-the-server]__fc05579d._.js +0 -3
  249. package/.next/standalone/.next/server/chunks/_41a98bd8._.js +0 -3
  250. package/.next/standalone/.next/server/chunks/src_497d2ad2._.js +0 -175
  251. package/.next/standalone/.next/server/chunks/src_lib_12408140._.js +0 -3
  252. package/.next/standalone/.next/static/chunks/01eddf501c574a44.js +0 -1
  253. package/.next/standalone/.next/static/chunks/1e782a49beaf489c.js +0 -1
  254. package/.next/standalone/.next/static/chunks/4071dbec4cf7e72e.js +0 -109
  255. package/.next/standalone/.next/static/chunks/67bd1a5de2195779.js +0 -1
  256. package/.next/standalone/.next/static/chunks/a87b5e84254095a5.js +0 -1
  257. package/.next/standalone/.next/static/chunks/c6bd2818656b1f20.css +0 -1
  258. package/.next/standalone/.next/static/chunks/dc59a07a8f327b40.js +0 -1
  259. package/.next/standalone/LICENSE +0 -21
  260. package/.next/standalone/bin/cli.js +0 -106
  261. package/.next/standalone/custom-models.example.json +0 -21
  262. package/.next/standalone/eslint.config.mjs +0 -18
  263. package/.next/standalone/features/feature-skill-used-jump-link/design/2026-03-18-skill-used-jump-link-design.md +0 -126
  264. package/.next/standalone/features/feature-skill-used-jump-link/feature.json +0 -32
  265. package/.next/standalone/features/feature-skill-used-jump-link/issue.md +0 -32
  266. package/.next/standalone/features/feature-skill-used-jump-link/plans/2026-03-18-skill-used-jump-link.md +0 -528
  267. package/.next/standalone/next.config.ts +0 -41
  268. package/.next/standalone/scripts/activate_telemetry.sh +0 -159
  269. package/.next/standalone/scripts/create_migration_package.sh +0 -124
  270. package/.next/standalone/scripts/fix_models.js +0 -66
  271. package/.next/standalone/scripts/init_opengauss.py +0 -284
  272. package/.next/standalone/scripts/install.js +0 -273
  273. package/.next/standalone/scripts/logs.js +0 -38
  274. package/.next/standalone/scripts/otel_data/logs.jsonl +0 -12
  275. package/.next/standalone/scripts/otel_data/metrics.jsonl +0 -21
  276. package/.next/standalone/scripts/otel_data/raw_requests.jsonl +0 -8
  277. package/.next/standalone/scripts/otel_data/raw_requests.jsonl.bak +0 -6
  278. package/.next/standalone/scripts/otel_receiver.py +0 -580
  279. package/.next/standalone/scripts/postinstall.js +0 -192
  280. package/.next/standalone/scripts/publish-npm.js +0 -401
  281. package/.next/standalone/scripts/restart.js +0 -26
  282. package/.next/standalone/scripts/restart.sh +0 -138
  283. package/.next/standalone/scripts/restart_dev.sh +0 -132
  284. package/.next/standalone/scripts/start.js +0 -291
  285. package/.next/standalone/scripts/status.js +0 -41
  286. package/.next/standalone/scripts/stop.js +0 -90
  287. package/.next/standalone/scripts/sync_skills.js +0 -216
  288. package/.next/standalone/scripts/utils.js +0 -235
  289. package/.next/standalone/tests/setup_skill_optimizer.sh +0 -118
  290. package/.next/standalone/tsconfig.json +0 -34
  291. package/.next/static/chunks/01eddf501c574a44.js +0 -1
  292. package/.next/static/chunks/1e782a49beaf489c.js +0 -1
  293. package/.next/static/chunks/4071dbec4cf7e72e.js +0 -109
  294. package/.next/static/chunks/67bd1a5de2195779.js +0 -1
  295. package/.next/static/chunks/a87b5e84254095a5.js +0 -1
  296. package/.next/static/chunks/c6bd2818656b1f20.css +0 -1
  297. package/.next/static/chunks/dc59a07a8f327b40.js +0 -1
  298. /package/.next/standalone/.next/static/{H581Rok68JtPV4bAVVH3l → iKG72t8Hpebb09DcIpKUJ}/_buildManifest.js +0 -0
  299. /package/.next/standalone/.next/static/{H581Rok68JtPV4bAVVH3l → iKG72t8Hpebb09DcIpKUJ}/_clientMiddlewareManifest.json +0 -0
  300. /package/.next/standalone/.next/static/{H581Rok68JtPV4bAVVH3l → iKG72t8Hpebb09DcIpKUJ}/_ssgManifest.js +0 -0
  301. /package/.next/static/{H581Rok68JtPV4bAVVH3l → iKG72t8Hpebb09DcIpKUJ}/_buildManifest.js +0 -0
  302. /package/.next/static/{H581Rok68JtPV4bAVVH3l → iKG72t8Hpebb09DcIpKUJ}/_clientMiddlewareManifest.json +0 -0
  303. /package/.next/static/{H581Rok68JtPV4bAVVH3l → iKG72t8Hpebb09DcIpKUJ}/_ssgManifest.js +0 -0
@@ -1,138 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Enable verbose mode to see what's happening
4
- # set -x
5
-
6
- # Navigate to the project root directory
7
- cd "$(dirname "$0")/.."
8
-
9
- # Auto-initialize environment and data directory
10
- if [ ! -f .env ] && [ -f .env.example ]; then
11
- echo "No .env found. Initializing from .env.example..."
12
- cp .env.example .env
13
- fi
14
-
15
- if [ ! -d data ]; then
16
- echo "Creating data directory..."
17
- mkdir -p data
18
- fi
19
-
20
- echo "=== Restart Script Started ==="
21
-
22
- # Function to find PID using various tools
23
- find_pid_on_port() {
24
- local port=$1
25
- local pid=""
26
-
27
- if command -v lsof >/dev/null 2>&1; then
28
- pid=$(lsof -t -i:$port)
29
- fi
30
-
31
- if [ -z "$pid" ] && command -v netstat >/dev/null 2>&1; then
32
- # Parse netstat output for PIDs
33
- pid=$(netstat -nlp 2>/dev/null | grep ":$port " | awk '{print $7}' | cut -d'/' -f1)
34
- fi
35
-
36
- if [ -z "$pid" ] && command -v ss >/dev/null 2>&1; then
37
- pid=$(ss -lptn "sport = :$port" 2>/dev/null | grep -oP 'pid=\K\d+')
38
- fi
39
-
40
- # Return the PID(s)
41
- echo "$pid"
42
- }
43
-
44
- PORT=3000
45
- echo "Checking port $PORT..."
46
-
47
- # Check for OpenGauss configuration in .env
48
- if [ -f .env ]; then
49
- # Load .env variables safely
50
- set -a
51
- source .env
52
- set +a
53
- fi
54
-
55
- if [ -n "$DB_HOST" ]; then
56
- echo "OpenGauss configuration detected (DB_HOST=$DB_HOST)."
57
- echo "Initializing OpenGauss database with project schema..."
58
-
59
- # Ensure psycopg2 is installed
60
- if ! python3 -c "import psycopg2" >/dev/null 2>&1; then
61
- echo "psycopg2 not found. Installing psycopg2-binary..."
62
- pip3 install psycopg2-binary
63
- fi
64
-
65
- # Run the initialization script
66
- python3 scripts/init_opengauss.py
67
- if [ $? -ne 0 ]; then
68
- echo "OpenGauss initialization failed! Aborting."
69
- exit 1
70
- fi
71
- echo "OpenGauss initialized successfully."
72
- else
73
- echo "No OpenGauss configuration (DB_HOST) found. Skipping OpenGauss init."
74
- fi
75
-
76
- # 1. Try finding PID specifically
77
- PIDS=$(find_pid_on_port $PORT)
78
-
79
- if [ -n "$PIDS" ]; then
80
- echo "Found process(es) occupying port $PORT: $PIDS"
81
- echo "Killing PIDS..."
82
- kill -9 $PIDS
83
- else
84
- echo "No PID found via standard tools (lsof/netstat/ss)."
85
- fi
86
-
87
- # 2. Force kill using fuser if available (very reliable)
88
- if command -v fuser >/dev/null 2>&1; then
89
- echo "Attempting to force kill with fuser..."
90
- fuser -k -n tcp $PORT >/dev/null 2>&1
91
- fi
92
-
93
- # 3. Double check
94
- echo "Waiting for port to release..."
95
- sleep 2
96
-
97
- PIDS_REMAINING=$(find_pid_on_port $PORT)
98
- if [ -n "$PIDS_REMAINING" ]; then
99
- echo "CRITICAL ERROR: Port $PORT is STILL in use by PID: $PIDS_REMAINING"
100
- echo "Please manually kill this process: kill -9 $PIDS_REMAINING"
101
- exit 1
102
- fi
103
-
104
- echo "Port $PORT is confirmed free."
105
-
106
- # 4. Build
107
- echo "-----------------------------------"
108
- echo "Syncing database schema..."
109
- npx prisma db push
110
-
111
- echo "Generating Prisma client..."
112
- npx prisma generate
113
-
114
- echo "Building project..."
115
- # Limit Node memory to 2GB to prevent OOM kills on small servers
116
- NODE_OPTIONS="--max-old-space-size=2048" npm run build
117
- if [ $? -ne 0 ]; then
118
- echo "Build failed! Aborting."
119
- exit 1
120
- fi
121
-
122
- # 5. Start
123
- echo "-----------------------------------"
124
- echo "Starting server..."
125
-
126
- # One last check before start
127
- if [ -n "$(find_pid_on_port $PORT)" ]; then
128
- echo "ERROR: Port $PORT was taken during build!"
129
- exit 1
130
- fi
131
-
132
- nohup npm run start > server.log 2>&1 &
133
- NEW_PID=$!
134
-
135
- echo "Server started successfully."
136
- echo "PID: $NEW_PID"
137
- echo "Log file: server.log"
138
- echo "-----------------------------------"
@@ -1,132 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Enable verbose mode to see what's happening
4
- # set -x
5
-
6
- # Navigate to the project root directory
7
- cd "$(dirname "$0")/.."
8
-
9
- # Auto-initialize environment and data directory
10
- if [ ! -f .env ] && [ -f .env.example ]; then
11
- echo "No .env found. Initializing from .env.example..."
12
- cp .env.example .env
13
- fi
14
-
15
- if [ ! -d data ]; then
16
- echo "Creating data directory..."
17
- mkdir -p data
18
- fi
19
-
20
- echo "=== Restart Script (DEV MODE) Started ==="
21
-
22
- # Function to find PID using various tools
23
- find_pid_on_port() {
24
- local port=$1
25
- local pid=""
26
-
27
- if command -v lsof >/dev/null 2>&1; then
28
- pid=$(lsof -t -i:${port} -sTCP:LISTEN)
29
- fi
30
-
31
- if [ -z "$pid" ] && command -v netstat >/dev/null 2>&1; then
32
- # Parse netstat output for PIDs
33
- pid=$(netstat -nlp 2>/dev/null | grep ":$port " | awk '{print $7}' | cut -d'/' -f1)
34
- fi
35
-
36
- if [ -z "$pid" ] && command -v ss >/dev/null 2>&1; then
37
- pid=$(ss -lptn "sport = :$port" 2>/dev/null | grep -oP 'pid=\K\d+')
38
- fi
39
-
40
- # Return the PID(s)
41
- echo "$pid"
42
- }
43
-
44
- PORT=3000
45
- echo "Checking port $PORT..."
46
-
47
- # Check for OpenGauss configuration in .env
48
- if [ -f .env ]; then
49
- # Load .env variables safely
50
- set -a
51
- source .env
52
- set +a
53
- fi
54
-
55
- if [ -n "$DB_HOST" ]; then
56
- echo "OpenGauss configuration detected (DB_HOST=$DB_HOST)."
57
- echo "Initializing OpenGauss database with project schema..."
58
-
59
- # Ensure psycopg2 is installed
60
- if ! python3 -c "import psycopg2" >/dev/null 2>&1; then
61
- echo "psycopg2 not found. Installing psycopg2-binary..."
62
- pip3 install psycopg2-binary
63
- fi
64
-
65
- # Run the initialization script
66
- python3 scripts/init_opengauss.py
67
- if [ $? -ne 0 ]; then
68
- echo "OpenGauss initialization failed! Aborting."
69
- exit 1
70
- fi
71
- echo "OpenGauss initialized successfully."
72
- else
73
- echo "No OpenGauss configuration (DB_HOST) found. Skipping OpenGauss init."
74
- fi
75
-
76
- # 1. Try finding PID specifically
77
- PIDS=$(find_pid_on_port $PORT)
78
-
79
- if [ -n "$PIDS" ]; then
80
- echo "Found process(es) occupying port $PORT: $PIDS"
81
- echo "Killing PIDS..."
82
- kill -9 $PIDS
83
- else
84
- echo "No PID found via standard tools (lsof/netstat/ss)."
85
- fi
86
-
87
- # 2. Force kill using fuser if available (very reliable)
88
- if command -v fuser >/dev/null 2>&1; then
89
- echo "Attempting to force kill with fuser..."
90
- fuser -k -n tcp $PORT >/dev/null 2>&1
91
- fi
92
-
93
- # 3. Double check
94
- echo "Waiting for port to release..."
95
- sleep 2
96
-
97
- PIDS_REMAINING=$(find_pid_on_port $PORT)
98
- if [ -n "$PIDS_REMAINING" ]; then
99
- echo "CRITICAL ERROR: Port $PORT is STILL in use by PID: $PIDS_REMAINING"
100
- echo "Please manually kill this process: kill -9 $PIDS_REMAINING"
101
- exit 1
102
- fi
103
-
104
- echo "Port $PORT is confirmed free."
105
-
106
- # 4. Start in DEV mode
107
- echo "-----------------------------------"
108
- echo "Syncing database schema..."
109
- npx prisma db push
110
-
111
- echo "Generating Prisma client..."
112
- npx prisma generate
113
-
114
- echo "Starting server in DEVELOPMENT mode (npm run dev)..."
115
-
116
- # Ensure environment variables are exported for the Node process
117
- set -a
118
- if [ -f .env ]; then
119
- source .env
120
- fi
121
- set +a
122
-
123
- # Debug: Print DB_HOST to confirm it's visible
124
- echo "DB_HOST for server: $DB_HOST"
125
-
126
- nohup npm run dev > server.log 2>&1 &
127
- NEW_PID=$!
128
-
129
- echo "Server started successfully."
130
- echo "PID: $NEW_PID"
131
- echo "Log file: server.log"
132
- echo "-----------------------------------"
@@ -1,291 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const { spawn, execSync } = require('child_process')
4
- const fs = require('fs')
5
- const path = require('path')
6
- const http = require('http')
7
- const os = require('os')
8
-
9
- const {
10
- findPidOnPort,
11
- killProcess,
12
- getPort,
13
- ensureEnvFile,
14
- ensureDataDirectory,
15
- runCommand,
16
- sleep,
17
- getDataRoot
18
- } = require('./utils.js')
19
-
20
- const PACKAGE_ROOT = path.resolve(__dirname, '..')
21
-
22
- const isWindows = process.platform === 'win32'
23
- const pythonCmd = isWindows ? 'python' : 'python3'
24
- const pipCmd = isWindows ? 'pip' : 'pip3'
25
-
26
- function loadEnvFile(envPath) {
27
- if (!fs.existsSync(envPath)) return {}
28
-
29
- const content = fs.readFileSync(envPath, 'utf8')
30
- const env = {}
31
-
32
- content.split('\n').forEach(line => {
33
- const trimmed = line.trim()
34
- if (!trimmed || trimmed.startsWith('#')) return
35
-
36
- const match = trimmed.match(/^([^=]+)=(.*)$/)
37
- if (match) {
38
- const key = match[1].trim()
39
- let value = match[2].trim()
40
- if ((value.startsWith('"') && value.endsWith('"')) ||
41
- (value.startsWith("'") && value.endsWith("'"))) {
42
- value = value.slice(1, -1)
43
- }
44
- env[key] = value
45
- }
46
- })
47
-
48
- return env
49
- }
50
-
51
- let spawnedProc = null
52
-
53
- async function createAdminUser(port) {
54
- return new Promise((resolve) => {
55
- const postData = JSON.stringify({ username: 'admin' })
56
-
57
- const options = {
58
- hostname: 'localhost',
59
- port: port,
60
- path: '/api/auth/apikey',
61
- method: 'POST',
62
- headers: {
63
- 'Content-Type': 'application/json',
64
- 'Content-Length': Buffer.byteLength(postData)
65
- }
66
- }
67
-
68
- const req = http.request(options, (res) => {
69
- let data = ''
70
- res.on('data', (chunk) => { data += chunk })
71
- res.on('end', () => {
72
- if (res.statusCode === 200 || res.statusCode === 201) {
73
- try {
74
- const result = JSON.parse(data)
75
- if (result.apiKey) {
76
- const skillInsightDir = path.join(os.homedir(), '.skill-insight')
77
- if (!fs.existsSync(skillInsightDir)) {
78
- fs.mkdirSync(skillInsightDir, { recursive: true })
79
- }
80
- const keyFilePath = path.join(skillInsightDir, '.admin_api_key')
81
- fs.writeFileSync(keyFilePath, result.apiKey, 'utf8')
82
- console.log('✓ Admin user created successfully')
83
- console.log(` API Key saved to: ${keyFilePath}`)
84
- }
85
- } catch (e) {
86
- console.log('⚠️ Failed to parse admin creation response:', e.message)
87
- }
88
- } else {
89
- console.log(`⚠️ Admin user creation returned status ${res.statusCode}`)
90
- }
91
- resolve()
92
- })
93
- })
94
-
95
- req.on('error', (e) => {
96
- console.log('⚠️ Failed to create admin user:', e.message)
97
- resolve()
98
- })
99
-
100
- req.write(postData)
101
- req.end()
102
- })
103
- }
104
-
105
- function cleanup() {
106
- if (spawnedProc) {
107
- try {
108
- spawnedProc.kill()
109
- } catch (e) {}
110
- }
111
- }
112
-
113
- process.on('SIGINT', () => {
114
- console.log('\nReceived SIGINT, cleaning up...')
115
- cleanup()
116
- process.exit(0)
117
- })
118
-
119
- process.on('SIGTERM', () => {
120
- console.log('\nReceived SIGTERM, cleaning up...')
121
- cleanup()
122
- process.exit(0)
123
- })
124
-
125
- async function run(options) {
126
- const port = getPort(options)
127
- const dataRoot = getDataRoot()
128
-
129
- console.log('=== Starting Skill-Insight Service ===\n')
130
-
131
- ensureEnvFile()
132
- ensureDataDirectory()
133
- console.log()
134
-
135
- const existingPid = findPidOnPort(port)
136
- if (existingPid) {
137
- console.log(`⚠️ Port ${port} is already in use by PID: ${existingPid}`)
138
- console.log('Please stop the existing service first or use a different port.')
139
- console.log(`\nTo stop: npx @witty-ai/skill-insight stop --port ${port}`)
140
- process.exit(1)
141
- }
142
-
143
- const dbPath = path.join(dataRoot, 'data', 'witty_insight.db')
144
- const dbUrl = `file:${dbPath}`
145
- process.env.DATABASE_URL = dbUrl
146
-
147
- const envPath = path.join(dataRoot, '.env')
148
- const fileEnv = loadEnvFile(envPath)
149
-
150
- if (fileEnv.DB_HOST) {
151
- console.log('OpenGauss configuration detected (DB_HOST=' + fileEnv.DB_HOST + ')')
152
- console.log('Initializing OpenGauss database with project schema...')
153
-
154
- try {
155
- execSync(`${pythonCmd} -c "import psycopg2"`, { stdio: 'pipe' })
156
- } catch (e) {
157
- console.log('psycopg2 not found. Installing psycopg2-binary...')
158
- try {
159
- execSync(`${pipCmd} install psycopg2-binary`, { stdio: 'inherit' })
160
- } catch (pipError) {
161
- console.log('Warning: Could not install psycopg2-binary. OpenGauss init may fail.')
162
- }
163
- }
164
-
165
- const initScript = path.join(PACKAGE_ROOT, 'scripts', 'init_opengauss.py')
166
- if (fs.existsSync(initScript)) {
167
- try {
168
- const initEnv = { ...process.env, ...fileEnv }
169
- execSync(`${pythonCmd} "${initScript}"`, {
170
- stdio: 'inherit',
171
- cwd: PACKAGE_ROOT,
172
- env: initEnv
173
- })
174
- console.log('✓ OpenGauss initialized successfully')
175
- } catch (initError) {
176
- console.error('Warning: OpenGauss initialization failed:', initError.message)
177
- console.error(`You may need to run it manually: ${pythonCmd} scripts/init_opengauss.py`)
178
- }
179
- } else {
180
- console.log('Warning: init_opengauss.py not found, skipping OpenGauss init')
181
- }
182
- console.log()
183
- }
184
-
185
- try {
186
- console.log('Syncing database schema...')
187
- await runCommand('npx prisma db push', {
188
- cwd: PACKAGE_ROOT,
189
- env: { ...process.env, DATABASE_URL: dbUrl }
190
- })
191
- console.log('✓ Database schema synced')
192
- console.log()
193
-
194
- console.log('Generating Prisma client...')
195
- await runCommand('npx prisma generate', {
196
- cwd: PACKAGE_ROOT,
197
- env: { ...process.env, DATABASE_URL: dbUrl }
198
- })
199
- console.log('✓ Prisma client generated')
200
- console.log()
201
- } catch (error) {
202
- console.error('❌ Database initialization failed:', error.message)
203
- process.exit(1)
204
- }
205
-
206
- const standaloneServer = path.join(PACKAGE_ROOT, '.next', 'standalone', 'server.js')
207
- const isStandalone = fs.existsSync(standaloneServer)
208
- const nextDir = path.join(PACKAGE_ROOT, '.next')
209
- const isProduction = fs.existsSync(nextDir) && fs.existsSync(path.join(nextDir, 'BUILD_ID'))
210
-
211
- console.log(`Starting server on port ${port}...`)
212
-
213
- const logPath = path.join(dataRoot, 'server.log')
214
-
215
- const env = {
216
- ...process.env,
217
- ...fileEnv,
218
- DATABASE_URL: dbUrl,
219
- PORT: port.toString(),
220
- HOSTNAME: '0.0.0.0'
221
- }
222
-
223
- let command, args
224
-
225
- if (isStandalone) {
226
- console.log('Mode: production (standalone)')
227
- command = 'node'
228
- args = [standaloneServer]
229
- } else if (isProduction) {
230
- console.log('Mode: production')
231
- command = 'npm'
232
- args = ['run', 'start']
233
- } else {
234
- console.log('Mode: development')
235
- command = 'npm'
236
- args = ['run', 'dev']
237
- }
238
-
239
- try {
240
- const logFd = fs.openSync(logPath, 'a')
241
-
242
- if (isWindows) {
243
- spawnedProc = spawn(command, args, {
244
- stdio: ['ignore', logFd, logFd],
245
- env,
246
- detached: true,
247
- cwd: PACKAGE_ROOT,
248
- windowsHide: true
249
- })
250
- } else {
251
- spawnedProc = spawn(command, args, {
252
- stdio: ['ignore', logFd, logFd],
253
- env,
254
- detached: true,
255
- cwd: PACKAGE_ROOT
256
- })
257
- }
258
-
259
- spawnedProc.on('error', (error) => {
260
- console.error('❌ Failed to spawn process:', error.message)
261
- process.exit(1)
262
- })
263
-
264
- spawnedProc.unref()
265
- } catch (error) {
266
- console.error('❌ Failed to spawn process:', error.message)
267
- process.exit(1)
268
- }
269
-
270
- const maxRetries = 10
271
- const retryDelay = 500
272
-
273
- for (let i = 0; i < maxRetries; i++) {
274
- await sleep(retryDelay)
275
- const pid = findPidOnPort(port)
276
- if (pid) {
277
- console.log('✓ Server started successfully')
278
- console.log(` PID: ${pid}`)
279
- console.log(` Port: ${port}`)
280
- console.log(` Log: ${logPath}`)
281
- console.log(` URL: http://localhost:${port}`)
282
- await createAdminUser(port)
283
- return
284
- }
285
- }
286
-
287
- console.error('❌ Failed to start server. Check server.log for details.')
288
- process.exit(1)
289
- }
290
-
291
- module.exports = { run }
@@ -1,41 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const {
4
- findPidOnPort,
5
- getPort,
6
- isPortListening
7
- } = require('./utils.js')
8
-
9
- async function run(options) {
10
- try {
11
- const port = getPort(options)
12
-
13
- console.log(`=== Skill-Insight Service Status ===\n`)
14
-
15
- const pid = findPidOnPort(port)
16
-
17
- if (pid) {
18
- console.log('✓ Service is running')
19
- console.log(` PID: ${pid}`)
20
- console.log(` Port: ${port}`)
21
- console.log(` URL: http://localhost:${port}`)
22
- } else {
23
- const isListening = await isPortListening(port)
24
- if (isListening) {
25
- console.log('✓ Service is running')
26
- console.log(` Port: ${port}`)
27
- console.log(` URL: http://localhost:${port}`)
28
- console.log(` Note: PID not available (limited permissions)`)
29
- } else {
30
- console.log('✗ Service is not running')
31
- console.log(` Port: ${port}`)
32
- console.log(`\nTo start: npx @witty-ai/skill-insight start --port ${port}`)
33
- }
34
- }
35
- } catch (error) {
36
- console.error('Error checking service status:', error.message)
37
- process.exit(1)
38
- }
39
- }
40
-
41
- module.exports = { run }
@@ -1,90 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const { execSync } = require('child_process')
4
- const {
5
- findPidOnPort,
6
- killProcess,
7
- getPort,
8
- isPortListening
9
- } = require('./utils.js')
10
-
11
- const isWindows = process.platform === 'win32'
12
-
13
- function killProcessByName(pattern) {
14
- if (isWindows) {
15
- try {
16
- execSync(`powershell -Command "Get-Process | Where-Object { $_.CommandLine -like '*${pattern}*' } | Stop-Process -Force"`, { stdio: 'ignore' })
17
- return true
18
- } catch (e) {
19
- return false
20
- }
21
- } else {
22
- try {
23
- execSync(`pkill -f "${pattern}"`, { stdio: 'ignore' })
24
- return true
25
- } catch (e) {
26
- return false
27
- }
28
- }
29
- }
30
-
31
- async function run(options) {
32
- const port = getPort(options)
33
-
34
- console.log(`=== Stopping Skill-Insight Service (Port: ${port}) ===\n`)
35
-
36
- const pid = findPidOnPort(port)
37
-
38
- if (pid) {
39
- console.log(`Found service running with PID: ${pid}`)
40
-
41
- if (killProcess(pid)) {
42
- console.log('✓ Service stopped successfully')
43
- } else {
44
- console.error(`❌ Failed to stop service (PID: ${pid})`)
45
- console.error('You may need to manually kill the process:')
46
- if (isWindows) {
47
- console.error(` taskkill /F /PID ${pid}`)
48
- } else {
49
- console.error(` kill -9 ${pid}`)
50
- }
51
- process.exit(1)
52
- }
53
- return
54
- }
55
-
56
- const isListening = await isPortListening(port)
57
- if (isListening) {
58
- console.log(`Service is running on port ${port} but PID not available.`)
59
- console.log('Trying to stop via process name...')
60
-
61
- killProcessByName('next dev')
62
- killProcessByName('next start')
63
-
64
- await new Promise(resolve => setTimeout(resolve, 1000))
65
-
66
- const stillListening = await isPortListening(port)
67
- if (!stillListening) {
68
- console.log('✓ Service stopped successfully')
69
- return
70
- }
71
-
72
- console.error('❌ Failed to stop service automatically.')
73
- console.error('Please stop the service manually:')
74
- if (isWindows) {
75
- console.error(' taskkill /F /IM node.exe')
76
- console.error(' or use Task Manager to find and end the process')
77
- } else {
78
- console.error(` pkill -f "next dev"`)
79
- console.error(` pkill -f "next start"`)
80
- console.error(' or find the process and kill it:')
81
- console.error(` ps aux | grep next`)
82
- }
83
- process.exit(1)
84
- return
85
- }
86
-
87
- console.log(`✓ No service running on port ${port}`)
88
- }
89
-
90
- module.exports = { run }