@witty-ai/skill-insight 0.4.0-beta → 0.6.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 (347) hide show
  1. package/.env.example +55 -5
  2. package/.next/standalone/.next/BUILD_ID +1 -1
  3. package/.next/standalone/.next/app-path-routes-manifest.json +5 -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 +30 -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 +3 -3
  18. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  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/organization/route/app-paths-manifest.json +3 -0
  25. package/.next/standalone/.next/server/app/api/auth/organization/route/build-manifest.json +11 -0
  26. package/.next/standalone/.next/server/app/api/auth/organization/route/server-reference-manifest.json +4 -0
  27. package/.next/standalone/.next/server/app/api/auth/organization/route.js +7 -0
  28. package/.next/standalone/.next/server/app/api/auth/organization/route.js.map +5 -0
  29. package/.next/standalone/.next/server/app/api/auth/organization/route.js.nft.json +1 -0
  30. package/.next/standalone/.next/server/app/api/auth/organization/route_client-reference-manifest.js +2 -0
  31. package/.next/standalone/.next/server/app/api/config/create/route.js +2 -2
  32. package/.next/standalone/.next/server/app/api/config/create/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/config/route.js +4 -4
  34. package/.next/standalone/.next/server/app/api/config/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/data/route.js +3 -3
  36. package/.next/standalone/.next/server/app/api/data/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/executions/[executionId]/analyze-match/route.js +1 -1
  38. package/.next/standalone/.next/server/app/api/executions/[executionId]/analyze-match/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/otel/v1/logs/route.js +3 -3
  40. package/.next/standalone/.next/server/app/api/otel/v1/logs/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/api/otel/v1/traces/route.js +2 -2
  42. package/.next/standalone/.next/server/app/api/otel/v1/traces/route.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/api/proxy/[taskId]/[...path]/route.js +1 -1
  44. package/.next/standalone/.next/server/app/api/proxy/[taskId]/[...path]/route.js.nft.json +1 -1
  45. package/.next/standalone/.next/server/app/api/proxy/[taskId]/end/route.js +5 -5
  46. package/.next/standalone/.next/server/app/api/proxy/[taskId]/end/route.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/api/rejudge/route.js +3 -3
  48. package/.next/standalone/.next/server/app/api/rejudge/route.js.nft.json +1 -1
  49. package/.next/standalone/.next/server/app/api/session/route.js +3 -3
  50. package/.next/standalone/.next/server/app/api/session/route.js.nft.json +1 -1
  51. package/.next/standalone/.next/server/app/api/settings/route.js +1 -1
  52. package/.next/standalone/.next/server/app/api/settings/route.js.nft.json +1 -1
  53. package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route/app-paths-manifest.json +3 -0
  54. package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route/build-manifest.json +11 -0
  55. package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route/server-reference-manifest.json +4 -0
  56. package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route.js +6 -0
  57. package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route.js.map +5 -0
  58. package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route.js.nft.json +1 -0
  59. package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route_client-reference-manifest.js +2 -0
  60. package/.next/standalone/.next/server/app/api/setup/opencode-tui/route/app-paths-manifest.json +3 -0
  61. package/.next/standalone/.next/server/app/api/setup/opencode-tui/route/build-manifest.json +11 -0
  62. package/.next/standalone/.next/server/app/api/setup/opencode-tui/route/server-reference-manifest.json +4 -0
  63. package/.next/standalone/.next/server/app/api/setup/opencode-tui/route.js +6 -0
  64. package/.next/standalone/.next/server/app/api/setup/opencode-tui/route.js.map +5 -0
  65. package/.next/standalone/.next/server/app/api/setup/opencode-tui/route.js.nft.json +1 -0
  66. package/.next/standalone/.next/server/app/api/setup/opencode-tui/route_client-reference-manifest.js +2 -0
  67. package/.next/standalone/.next/server/app/api/skills/[id]/versions/[version]/download/route.js.nft.json +1 -1
  68. package/.next/standalone/.next/server/app/api/skills/[id]/versions/[version]/parse-flow/route.js +1 -1
  69. package/.next/standalone/.next/server/app/api/skills/[id]/versions/[version]/parse-flow/route.js.nft.json +1 -1
  70. package/.next/standalone/.next/server/app/api/skills/[id]/versions/[version]/route.js +3 -2
  71. package/.next/standalone/.next/server/app/api/skills/[id]/versions/[version]/route.js.nft.json +1 -1
  72. package/.next/standalone/.next/server/app/api/skills/automation/import/route.js.nft.json +1 -1
  73. package/.next/standalone/.next/server/app/api/skills/logs/route.js +2 -2
  74. package/.next/standalone/.next/server/app/api/skills/logs/route.js.nft.json +1 -1
  75. package/.next/standalone/.next/server/app/api/skills/route.js +3 -2
  76. package/.next/standalone/.next/server/app/api/skills/route.js.nft.json +1 -1
  77. package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route/app-paths-manifest.json +3 -0
  78. package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route/build-manifest.json +11 -0
  79. package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route/server-reference-manifest.json +4 -0
  80. package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route.js +8 -0
  81. package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route.js.map +5 -0
  82. package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route.js.nft.json +1 -0
  83. package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route_client-reference-manifest.js +2 -0
  84. package/.next/standalone/.next/server/app/api/task-stats/route/app-paths-manifest.json +3 -0
  85. package/.next/standalone/.next/server/app/api/task-stats/route/build-manifest.json +11 -0
  86. package/.next/standalone/.next/server/app/api/task-stats/route/server-reference-manifest.json +4 -0
  87. package/.next/standalone/.next/server/app/api/task-stats/route.js +11 -0
  88. package/.next/standalone/.next/server/app/api/task-stats/route.js.map +5 -0
  89. package/.next/standalone/.next/server/app/api/task-stats/route.js.nft.json +1 -0
  90. package/.next/standalone/.next/server/app/api/task-stats/route_client-reference-manifest.js +2 -0
  91. package/.next/standalone/.next/server/app/api/upload/route.js +2 -2
  92. package/.next/standalone/.next/server/app/api/upload/route.js.nft.json +1 -1
  93. package/.next/standalone/.next/server/app/details/page/react-loadable-manifest.json +2 -2
  94. package/.next/standalone/.next/server/app/details/page.js.nft.json +1 -1
  95. package/.next/standalone/.next/server/app/details/page_client-reference-manifest.js +1 -1
  96. package/.next/standalone/.next/server/app/details.html +1 -1
  97. package/.next/standalone/.next/server/app/details.rsc +4 -4
  98. package/.next/standalone/.next/server/app/details.segments/_full.segment.rsc +4 -4
  99. package/.next/standalone/.next/server/app/details.segments/_head.segment.rsc +1 -1
  100. package/.next/standalone/.next/server/app/details.segments/_index.segment.rsc +3 -3
  101. package/.next/standalone/.next/server/app/details.segments/_tree.segment.rsc +2 -2
  102. package/.next/standalone/.next/server/app/details.segments/details/__PAGE__.segment.rsc +2 -2
  103. package/.next/standalone/.next/server/app/details.segments/details.segment.rsc +1 -1
  104. package/.next/standalone/.next/server/app/index.html +1 -1
  105. package/.next/standalone/.next/server/app/index.rsc +4 -4
  106. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  107. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +4 -4
  108. package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  109. package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +3 -3
  110. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  111. package/.next/standalone/.next/server/app/login/page.js.nft.json +1 -1
  112. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  113. package/.next/standalone/.next/server/app/login.html +1 -1
  114. package/.next/standalone/.next/server/app/login.rsc +4 -4
  115. package/.next/standalone/.next/server/app/login.segments/_full.segment.rsc +4 -4
  116. package/.next/standalone/.next/server/app/login.segments/_head.segment.rsc +1 -1
  117. package/.next/standalone/.next/server/app/login.segments/_index.segment.rsc +3 -3
  118. package/.next/standalone/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  119. package/.next/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  120. package/.next/standalone/.next/server/app/login.segments/login.segment.rsc +1 -1
  121. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  122. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  123. package/.next/standalone/.next/server/app/skills/page.js.nft.json +1 -1
  124. package/.next/standalone/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  125. package/.next/standalone/.next/server/app/skills.html +1 -1
  126. package/.next/standalone/.next/server/app/skills.rsc +4 -4
  127. package/.next/standalone/.next/server/app/skills.segments/_full.segment.rsc +4 -4
  128. package/.next/standalone/.next/server/app/skills.segments/_head.segment.rsc +1 -1
  129. package/.next/standalone/.next/server/app/skills.segments/_index.segment.rsc +3 -3
  130. package/.next/standalone/.next/server/app/skills.segments/_tree.segment.rsc +2 -2
  131. package/.next/standalone/.next/server/app/skills.segments/skills/__PAGE__.segment.rsc +2 -2
  132. package/.next/standalone/.next/server/app/skills.segments/skills.segment.rsc +1 -1
  133. package/.next/standalone/.next/server/app-paths-manifest.json +5 -0
  134. package/.next/standalone/.next/server/chunks/[root-of-the-server]__02ddba88._.js +3 -0
  135. package/.next/standalone/.next/server/chunks/[root-of-the-server]__15dbd1f2._.js +3 -0
  136. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1ce5e3b8._.js +3 -0
  137. package/.next/standalone/.next/server/chunks/[root-of-the-server]__4a6d443b._.js +3 -0
  138. package/.next/standalone/.next/server/chunks/[root-of-the-server]__53775b48._.js +3 -0
  139. package/.next/standalone/.next/server/chunks/[root-of-the-server]__5444db55._.js +3 -0
  140. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6923eecf._.js +3 -0
  141. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6d8053e2._.js +1 -1
  142. package/.next/standalone/.next/server/chunks/[root-of-the-server]__8402dfd1._.js +3 -0
  143. package/.next/standalone/.next/server/chunks/[root-of-the-server]__863cf6de._.js +1 -1
  144. package/.next/standalone/.next/server/chunks/[root-of-the-server]__89404730._.js +3 -0
  145. package/.next/standalone/.next/server/chunks/[root-of-the-server]__98b3de5e._.js +3 -0
  146. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a4d3d791._.js +3 -0
  147. package/.next/standalone/.next/server/chunks/[root-of-the-server]__aa5c8858._.js +2 -2
  148. package/.next/standalone/.next/server/chunks/[root-of-the-server]__bd91659b._.js +3 -0
  149. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c200214a._.js +3 -0
  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]__d7fab946._.js +3 -0
  152. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d8c1808b._.js +1 -1
  153. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d9b9fecc._.js +3 -0
  154. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ddf63a21._.js +3 -0
  155. package/.next/standalone/.next/server/chunks/[root-of-the-server]__f9e66e02._.js +3 -0
  156. package/.next/standalone/.next/server/chunks/_3e8b4d8c._.js +1 -1
  157. package/.next/standalone/.next/server/chunks/_41a98bd8._.js +1 -1
  158. package/.next/standalone/.next/server/chunks/_4c806e26._.js +3 -0
  159. package/.next/standalone/.next/server/chunks/_cd3d20ca._.js +1 -1
  160. package/.next/standalone/.next/server/chunks/_ddffef3e._.js +1 -1
  161. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_auth_organization_route_actions_f58710b7.js +3 -0
  162. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_setup_opencode-tui_route_actions_fc8ae29f.js +3 -0
  163. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_skills_sync-enterprise_route_actions_0ca45899.js +3 -0
  164. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_task-stats_route_actions_983505cd.js +3 -0
  165. package/.next/standalone/.next/server/chunks/ce889_server_app_api_setup_opencode-commands_si-optimizer_route_actions_fcde30ef.js +3 -0
  166. package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_c33286ed.js +47 -43
  167. package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_f42faeee.js +1 -1
  168. package/.next/standalone/.next/server/chunks/src_98433cb8._.js +175 -0
  169. package/.next/standalone/.next/server/chunks/src_lib_12408140._.js +1 -1
  170. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__5d576168._.js → [root-of-the-server]__40353d98._.js} +1 -1
  171. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__89851212._.js → [root-of-the-server]__480fcd92._.js} +1 -1
  172. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__28978655._.js → [root-of-the-server]__48f8fbcb._.js} +1 -1
  173. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__a5ef0b61._.js → [root-of-the-server]__49921b2a._.js} +1 -1
  174. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__317833f9._.js → [root-of-the-server]__593be3d6._.js} +1 -1
  175. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__ca101543._.js → [root-of-the-server]__5e9ff641._.js} +1 -1
  176. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__90641614._.js → [root-of-the-server]__66cc6ff2._.js} +1 -1
  177. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__cda1e286._.js → [root-of-the-server]__9889bdc8._.js} +1 -1
  178. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__42ba97b6._.js → [root-of-the-server]__9905ca7a._.js} +2 -2
  179. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__9ab7cc4a._.js +3 -0
  180. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__7bb97139._.js → [root-of-the-server]__9d6b7d48._.js} +1 -1
  181. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__6b8b9bb9._.js → [root-of-the-server]__b8edc8c6._.js} +1 -1
  182. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__b9972e88._.js → [root-of-the-server]__d691ecb0._.js} +1 -1
  183. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__52851239._.js → [root-of-the-server]__e5ddfd15._.js} +1 -1
  184. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__9630dedf._.js → [root-of-the-server]__f72f330e._.js} +1 -1
  185. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__99ab66d7._.js → [root-of-the-server]__f843e085._.js} +1 -1
  186. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__d424fa04._.js → [root-of-the-server]__fd69d276._.js} +2 -2
  187. package/.next/standalone/.next/server/chunks/ssr/{_7688d7cd._.js → _049876f0._.js} +2 -2
  188. package/.next/standalone/.next/server/chunks/ssr/{_72a74a0c._.js → _09546b95._.js} +2 -2
  189. package/.next/standalone/.next/server/chunks/ssr/_8f5379ab._.js +1 -1
  190. package/.next/standalone/.next/server/chunks/ssr/{node_modules_cf1f3d2c._.js → _b121f1ae._.js} +2 -2
  191. package/.next/standalone/.next/server/chunks/ssr/_c8c8c083._.js +2 -2
  192. package/.next/standalone/.next/server/chunks/ssr/_fd46f439._.js +2 -1
  193. package/.next/standalone/.next/server/chunks/ssr/{node_modules_f2653232._.js → node_modules_039c6a11._.js} +1 -1
  194. package/.next/standalone/.next/server/chunks/ssr/{node_modules_da87f0e3._.js → node_modules_0d3530cd._.js} +2 -2
  195. package/.next/standalone/.next/server/chunks/ssr/{node_modules_afb1ecef._.js → node_modules_0e883565._.js} +1 -1
  196. package/.next/standalone/.next/server/chunks/ssr/{node_modules_8d9e56b7._.js → node_modules_11dbf165._.js} +2 -2
  197. package/.next/standalone/.next/server/chunks/ssr/{node_modules_76d6c533._.js → node_modules_2041c122._.js} +2 -2
  198. package/.next/standalone/.next/server/chunks/ssr/{node_modules_b007145b._.js → node_modules_235267bb._.js} +1 -1
  199. package/.next/standalone/.next/server/chunks/ssr/{node_modules_11d81adf._.js → node_modules_25dfb0ba._.js} +2 -2
  200. package/.next/standalone/.next/server/chunks/ssr/{node_modules_4ea9b27b._.js → node_modules_2b12c669._.js} +2 -2
  201. package/.next/standalone/.next/server/chunks/ssr/{node_modules_cc19e85c._.js → node_modules_32996880._.js} +2 -2
  202. package/.next/standalone/.next/server/chunks/ssr/{node_modules_62621b34._.js → node_modules_35885fe9._.js} +2 -2
  203. package/.next/standalone/.next/server/chunks/ssr/{node_modules_ed4150ad._.js → node_modules_38a95353._.js} +2 -2
  204. package/.next/standalone/.next/server/chunks/ssr/{node_modules_f596a14c._.js → node_modules_3a317c51._.js} +1 -1
  205. package/.next/standalone/.next/server/chunks/ssr/{node_modules_fddab329._.js → node_modules_44966ab2._.js} +1 -1
  206. package/.next/standalone/.next/server/chunks/ssr/{node_modules_e272ac31._.js → node_modules_53af751a._.js} +2 -2
  207. package/.next/standalone/.next/server/chunks/ssr/{node_modules_abf4f826._.js → node_modules_5f539891._.js} +1 -1
  208. package/.next/standalone/.next/server/chunks/ssr/{node_modules_86b6ffa4._.js → node_modules_60402210._.js} +1 -1
  209. package/.next/standalone/.next/server/chunks/ssr/{node_modules_3769cd60._.js → node_modules_60eccfb6._.js} +1 -1
  210. package/.next/standalone/.next/server/chunks/ssr/{node_modules_fdf808cf._.js → node_modules_632c098c._.js} +1 -1
  211. package/.next/standalone/.next/server/chunks/ssr/{node_modules_442994dc._.js → node_modules_6c42f75c._.js} +1 -1
  212. package/.next/standalone/.next/server/chunks/ssr/{node_modules_5b6dbbc3._.js → node_modules_6fbe276d._.js} +2 -2
  213. package/.next/standalone/.next/server/chunks/ssr/{node_modules_6716e25d._.js → node_modules_740e9d59._.js} +2 -2
  214. package/.next/standalone/.next/server/chunks/ssr/{node_modules_ed1f1845._.js → node_modules_7a3d551c._.js} +1 -1
  215. package/.next/standalone/.next/server/chunks/ssr/{node_modules_4f41f172._.js → node_modules_861cb9cf._.js} +2 -2
  216. package/.next/standalone/.next/server/chunks/ssr/{node_modules_2aaea4ea._.js → node_modules_8a892761._.js} +1 -1
  217. package/.next/standalone/.next/server/chunks/ssr/{node_modules_3964c298._.js → node_modules_a5a4946e._.js} +1 -1
  218. package/.next/standalone/.next/server/chunks/ssr/{node_modules_3d9afa91._.js → node_modules_a712c937._.js} +1 -1
  219. package/.next/standalone/.next/server/chunks/ssr/{node_modules_330b9e3c._.js → node_modules_a8c276dd._.js} +2 -2
  220. package/.next/standalone/.next/server/chunks/ssr/{node_modules_ad69a9e4._.js → node_modules_acc9d529._.js} +1 -1
  221. package/.next/standalone/.next/server/chunks/ssr/{node_modules_8301968d._.js → node_modules_ad07ab39._.js} +1 -1
  222. package/.next/standalone/.next/server/chunks/ssr/{node_modules_1d88c7cc._.js → node_modules_b38efa22._.js} +1 -1
  223. package/.next/standalone/.next/server/chunks/ssr/{node_modules_e20e8c2a._.js → node_modules_b4ef036d._.js} +2 -2
  224. package/.next/standalone/.next/server/chunks/ssr/{node_modules_2e206c58._.js → node_modules_b6bad701._.js} +2 -2
  225. package/.next/standalone/.next/server/chunks/ssr/{node_modules_c90fa812._.js → node_modules_b9810024._.js} +1 -1
  226. package/.next/standalone/.next/server/chunks/ssr/{node_modules_db8af6e3._.js → node_modules_b9ad808d._.js} +1 -1
  227. package/.next/standalone/.next/server/chunks/ssr/{node_modules_7287189a._.js → node_modules_bc287d9f._.js} +1 -1
  228. package/.next/standalone/.next/server/chunks/ssr/{node_modules_2e38bc5c._.js → node_modules_c6469d93._.js} +1 -1
  229. package/.next/standalone/.next/server/chunks/ssr/{node_modules_c657890f._.js → node_modules_c704e802._.js} +1 -1
  230. package/.next/standalone/.next/server/chunks/ssr/{node_modules_b8803ba6._.js → node_modules_cda46cfc._.js} +2 -2
  231. package/.next/standalone/.next/server/chunks/ssr/{node_modules_aa6da06c._.js → node_modules_cf171d0c._.js} +1 -1
  232. package/.next/standalone/.next/server/chunks/ssr/node_modules_dagre-d3-es_src_dagre_index_3582f3d0.js +1 -1
  233. package/.next/standalone/.next/server/chunks/ssr/{node_modules_2d9e03d1._.js → node_modules_e8927fc2._.js} +1 -1
  234. package/.next/standalone/.next/server/chunks/ssr/node_modules_lodash-es_a1341fea._.js +1 -1
  235. package/.next/standalone/.next/server/chunks/ssr/node_modules_lodash-es_e1de6ed8._.js +1 -1
  236. package/.next/standalone/.next/server/chunks/ssr/src_app_login_page_tsx_72f58654._.js +1 -1
  237. package/.next/standalone/.next/server/pages/404.html +1 -1
  238. package/.next/standalone/.next/server/pages/500.html +2 -2
  239. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  240. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  241. package/.next/standalone/.next/static/chunks/1e782a49beaf489c.js +1 -0
  242. package/.next/standalone/.next/static/chunks/{01eddf501c574a44.js → 4ee8dc41c9f15b7b.js} +1 -1
  243. package/.next/standalone/.next/static/chunks/67bd1a5de2195779.js +1 -0
  244. package/.next/standalone/.next/static/chunks/{737b8cff3c6a4e30.js → 9445b2873a413c58.js} +1 -1
  245. package/.next/standalone/.next/static/chunks/94dfb15df65ef720.js +2 -0
  246. package/.next/standalone/.next/static/chunks/9d1c5c3494fa53de.js +109 -0
  247. package/.next/standalone/.next/static/chunks/c6bd2818656b1f20.css +1 -0
  248. package/.next/standalone/.next/static/chunks/{e09d9ee16fe90255.js → cd0fde15dc0dfcca.js} +1 -1
  249. package/.next/standalone/.next/static/chunks/{6d12c79948c7e0ac.js → dc59a07a8f327b40.js} +1 -1
  250. package/.next/standalone/.next/static/chunks/{ff6357067630b168.js → e13d208072a48316.js} +1 -1
  251. package/.next/standalone/node_modules/.prisma/client/edge.js +6 -3
  252. package/.next/standalone/node_modules/.prisma/client/index-browser.js +3 -0
  253. package/.next/standalone/node_modules/.prisma/client/index.js +6 -3
  254. package/.next/standalone/node_modules/.prisma/client/package.json +1 -1
  255. package/.next/standalone/node_modules/.prisma/client/schema.prisma +12 -9
  256. package/.next/standalone/node_modules/.prisma/client/wasm.js +3 -0
  257. package/.next/standalone/node_modules/adm-zip/util/constants.js +142 -0
  258. package/.next/standalone/node_modules/adm-zip/util/decoder.js +5 -0
  259. package/.next/standalone/node_modules/adm-zip/util/errors.js +63 -0
  260. package/.next/standalone/node_modules/adm-zip/util/fattr.js +76 -0
  261. package/.next/standalone/node_modules/adm-zip/util/index.js +5 -0
  262. package/.next/standalone/node_modules/adm-zip/util/utils.js +339 -0
  263. package/.next/standalone/package.json +6 -2
  264. package/.next/standalone/prisma/schema.prisma +3 -0
  265. package/.next/standalone/scripts/opencode_plugin.ts +279 -40
  266. package/.next/standalone/scripts/opencode_tui_plugin.tsx +308 -0
  267. package/.next/standalone/scripts/si-optimizer.md +5 -0
  268. package/.next/static/chunks/1e782a49beaf489c.js +1 -0
  269. package/.next/static/chunks/{01eddf501c574a44.js → 4ee8dc41c9f15b7b.js} +1 -1
  270. package/.next/static/chunks/67bd1a5de2195779.js +1 -0
  271. package/.next/static/chunks/{737b8cff3c6a4e30.js → 9445b2873a413c58.js} +1 -1
  272. package/.next/static/chunks/94dfb15df65ef720.js +2 -0
  273. package/.next/static/chunks/9d1c5c3494fa53de.js +109 -0
  274. package/.next/static/chunks/c6bd2818656b1f20.css +1 -0
  275. package/.next/static/chunks/{e09d9ee16fe90255.js → cd0fde15dc0dfcca.js} +1 -1
  276. package/.next/static/chunks/{6d12c79948c7e0ac.js → dc59a07a8f327b40.js} +1 -1
  277. package/.next/static/chunks/{ff6357067630b168.js → e13d208072a48316.js} +1 -1
  278. package/package.json +6 -2
  279. package/prisma/schema.prisma +3 -0
  280. package/scripts/activate_telemetry.sh +44 -1
  281. package/scripts/opencode_plugin.ts +279 -40
  282. package/scripts/opencode_tui_plugin.tsx +308 -0
  283. package/scripts/si-optimizer.md +5 -0
  284. package/scripts/utils.js +0 -1
  285. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0fceba52._.js +0 -3
  286. package/.next/standalone/.next/server/chunks/[root-of-the-server]__13132848._.js +0 -3
  287. package/.next/standalone/.next/server/chunks/[root-of-the-server]__30769f6e._.js +0 -3
  288. package/.next/standalone/.next/server/chunks/[root-of-the-server]__426bc4ab._.js +0 -3
  289. package/.next/standalone/.next/server/chunks/[root-of-the-server]__610d08bc._.js +0 -3
  290. package/.next/standalone/.next/server/chunks/[root-of-the-server]__75e3674c._.js +0 -3
  291. package/.next/standalone/.next/server/chunks/[root-of-the-server]__761462f8._.js +0 -3
  292. package/.next/standalone/.next/server/chunks/[root-of-the-server]__9aa700a4._.js +0 -3
  293. package/.next/standalone/.next/server/chunks/[root-of-the-server]__b7ad2649._.js +0 -3
  294. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c00180dd._.js +0 -3
  295. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e2f0baee._.js +0 -3
  296. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ed8f9b78._.js +0 -3
  297. package/.next/standalone/.next/server/chunks/[root-of-the-server]__fc05579d._.js +0 -3
  298. package/.next/standalone/.next/server/chunks/src_497d2ad2._.js +0 -175
  299. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__082c32a2._.js +0 -3
  300. package/.next/standalone/.next/static/chunks/222a937a6c859036.js +0 -1
  301. package/.next/standalone/.next/static/chunks/2a3dd49367e2c198.js +0 -1
  302. package/.next/standalone/.next/static/chunks/3e33f7adc10a38d3.js +0 -109
  303. package/.next/standalone/.next/static/chunks/428e6cf64b115e9d.css +0 -1
  304. package/.next/standalone/.next/static/chunks/62129f27f303a5ba.js +0 -1
  305. package/.next/standalone/LICENSE +0 -21
  306. package/.next/standalone/bin/cli.js +0 -106
  307. package/.next/standalone/custom-models.example.json +0 -21
  308. package/.next/standalone/eslint.config.mjs +0 -18
  309. package/.next/standalone/features/feature-skill-used-jump-link/design/2026-03-18-skill-used-jump-link-design.md +0 -126
  310. package/.next/standalone/features/feature-skill-used-jump-link/feature.json +0 -32
  311. package/.next/standalone/features/feature-skill-used-jump-link/issue.md +0 -32
  312. package/.next/standalone/features/feature-skill-used-jump-link/plans/2026-03-18-skill-used-jump-link.md +0 -528
  313. package/.next/standalone/next.config.ts +0 -29
  314. package/.next/standalone/scripts/activate_telemetry.sh +0 -159
  315. package/.next/standalone/scripts/create_migration_package.sh +0 -124
  316. package/.next/standalone/scripts/fix_models.js +0 -66
  317. package/.next/standalone/scripts/init_opengauss.py +0 -284
  318. package/.next/standalone/scripts/install.js +0 -273
  319. package/.next/standalone/scripts/logs.js +0 -38
  320. package/.next/standalone/scripts/otel_data/logs.jsonl +0 -12
  321. package/.next/standalone/scripts/otel_data/metrics.jsonl +0 -21
  322. package/.next/standalone/scripts/otel_data/raw_requests.jsonl +0 -8
  323. package/.next/standalone/scripts/otel_data/raw_requests.jsonl.bak +0 -6
  324. package/.next/standalone/scripts/otel_receiver.py +0 -580
  325. package/.next/standalone/scripts/postinstall.js +0 -192
  326. package/.next/standalone/scripts/publish-npm.js +0 -401
  327. package/.next/standalone/scripts/restart.js +0 -26
  328. package/.next/standalone/scripts/restart.sh +0 -138
  329. package/.next/standalone/scripts/restart_dev.sh +0 -132
  330. package/.next/standalone/scripts/start.js +0 -291
  331. package/.next/standalone/scripts/status.js +0 -41
  332. package/.next/standalone/scripts/stop.js +0 -90
  333. package/.next/standalone/scripts/sync_skills.js +0 -216
  334. package/.next/standalone/scripts/utils.js +0 -235
  335. package/.next/standalone/tests/setup_skill_optimizer.sh +0 -118
  336. package/.next/standalone/tsconfig.json +0 -34
  337. package/.next/static/chunks/222a937a6c859036.js +0 -1
  338. package/.next/static/chunks/2a3dd49367e2c198.js +0 -1
  339. package/.next/static/chunks/3e33f7adc10a38d3.js +0 -109
  340. package/.next/static/chunks/428e6cf64b115e9d.css +0 -1
  341. package/.next/static/chunks/62129f27f303a5ba.js +0 -1
  342. /package/.next/standalone/.next/static/{Eytv_Fh4x2HPaupjXiAYj → 0uvhCJooDO_gMNlKOaHwB}/_buildManifest.js +0 -0
  343. /package/.next/standalone/.next/static/{Eytv_Fh4x2HPaupjXiAYj → 0uvhCJooDO_gMNlKOaHwB}/_clientMiddlewareManifest.json +0 -0
  344. /package/.next/standalone/.next/static/{Eytv_Fh4x2HPaupjXiAYj → 0uvhCJooDO_gMNlKOaHwB}/_ssgManifest.js +0 -0
  345. /package/.next/static/{Eytv_Fh4x2HPaupjXiAYj → 0uvhCJooDO_gMNlKOaHwB}/_buildManifest.js +0 -0
  346. /package/.next/static/{Eytv_Fh4x2HPaupjXiAYj → 0uvhCJooDO_gMNlKOaHwB}/_clientMiddlewareManifest.json +0 -0
  347. /package/.next/static/{Eytv_Fh4x2HPaupjXiAYj → 0uvhCJooDO_gMNlKOaHwB}/_ssgManifest.js +0 -0
@@ -31,15 +31,17 @@ model Skill {
31
31
  }
32
32
 
33
33
  model SkillVersion {
34
- id String @id @default(cuid())
35
- skillId String
36
- version Int
37
- content String
38
- assetPath String?
39
- files String?
40
- changeLog String?
41
- createdAt DateTime @default(now())
42
- Skill Skill @relation(fields: [skillId], references: [id], onDelete: Cascade)
34
+ id String @id @default(cuid())
35
+ skillId String
36
+ version Int
37
+ semanticVersion String? // 语义化版本号,用于企业同步
38
+ enterpriseSkillId Int? // 企业skill的id,用于删除同步
39
+ content String
40
+ assetPath String?
41
+ files String?
42
+ changeLog String?
43
+ createdAt DateTime @default(now())
44
+ Skill Skill @relation(fields: [skillId], references: [id], onDelete: Cascade)
43
45
 
44
46
  @@unique([skillId, version])
45
47
  }
@@ -67,6 +69,7 @@ model Execution {
67
69
  cacheReadInputTokens Int?
68
70
  cacheCreationInputTokens Int?
69
71
  maxSingleCallTokens Int?
72
+ reasoningTokens Int?
70
73
  timestamp DateTime @default(now())
71
74
  model String?
72
75
  finalResult String?
@@ -138,6 +138,8 @@ exports.Prisma.SkillVersionScalarFieldEnum = {
138
138
  id: 'id',
139
139
  skillId: 'skillId',
140
140
  version: 'version',
141
+ semanticVersion: 'semanticVersion',
142
+ enterpriseSkillId: 'enterpriseSkillId',
141
143
  content: 'content',
142
144
  assetPath: 'assetPath',
143
145
  files: 'files',
@@ -168,6 +170,7 @@ exports.Prisma.ExecutionScalarFieldEnum = {
168
170
  cacheReadInputTokens: 'cacheReadInputTokens',
169
171
  cacheCreationInputTokens: 'cacheCreationInputTokens',
170
172
  maxSingleCallTokens: 'maxSingleCallTokens',
173
+ reasoningTokens: 'reasoningTokens',
171
174
  timestamp: 'timestamp',
172
175
  model: 'model',
173
176
  finalResult: 'finalResult',
@@ -0,0 +1,142 @@
1
+ module.exports = {
2
+ /* The local file header */
3
+ LOCHDR : 30, // LOC header size
4
+ LOCSIG : 0x04034b50, // "PK\003\004"
5
+ LOCVER : 4, // version needed to extract
6
+ LOCFLG : 6, // general purpose bit flag
7
+ LOCHOW : 8, // compression method
8
+ LOCTIM : 10, // modification time (2 bytes time, 2 bytes date)
9
+ LOCCRC : 14, // uncompressed file crc-32 value
10
+ LOCSIZ : 18, // compressed size
11
+ LOCLEN : 22, // uncompressed size
12
+ LOCNAM : 26, // filename length
13
+ LOCEXT : 28, // extra field length
14
+
15
+ /* The Data descriptor */
16
+ EXTSIG : 0x08074b50, // "PK\007\008"
17
+ EXTHDR : 16, // EXT header size
18
+ EXTCRC : 4, // uncompressed file crc-32 value
19
+ EXTSIZ : 8, // compressed size
20
+ EXTLEN : 12, // uncompressed size
21
+
22
+ /* The central directory file header */
23
+ CENHDR : 46, // CEN header size
24
+ CENSIG : 0x02014b50, // "PK\001\002"
25
+ CENVEM : 4, // version made by
26
+ CENVER : 6, // version needed to extract
27
+ CENFLG : 8, // encrypt, decrypt flags
28
+ CENHOW : 10, // compression method
29
+ CENTIM : 12, // modification time (2 bytes time, 2 bytes date)
30
+ CENCRC : 16, // uncompressed file crc-32 value
31
+ CENSIZ : 20, // compressed size
32
+ CENLEN : 24, // uncompressed size
33
+ CENNAM : 28, // filename length
34
+ CENEXT : 30, // extra field length
35
+ CENCOM : 32, // file comment length
36
+ CENDSK : 34, // volume number start
37
+ CENATT : 36, // internal file attributes
38
+ CENATX : 38, // external file attributes (host system dependent)
39
+ CENOFF : 42, // LOC header offset
40
+
41
+ /* The entries in the end of central directory */
42
+ ENDHDR : 22, // END header size
43
+ ENDSIG : 0x06054b50, // "PK\005\006"
44
+ ENDSUB : 8, // number of entries on this disk
45
+ ENDTOT : 10, // total number of entries
46
+ ENDSIZ : 12, // central directory size in bytes
47
+ ENDOFF : 16, // offset of first CEN header
48
+ ENDCOM : 20, // zip file comment length
49
+
50
+ END64HDR : 20, // zip64 END header size
51
+ END64SIG : 0x07064b50, // zip64 Locator signature, "PK\006\007"
52
+ END64START : 4, // number of the disk with the start of the zip64
53
+ END64OFF : 8, // relative offset of the zip64 end of central directory
54
+ END64NUMDISKS : 16, // total number of disks
55
+
56
+ ZIP64SIG : 0x06064b50, // zip64 signature, "PK\006\006"
57
+ ZIP64HDR : 56, // zip64 record minimum size
58
+ ZIP64LEAD : 12, // leading bytes at the start of the record, not counted by the value stored in ZIP64SIZE
59
+ ZIP64SIZE : 4, // zip64 size of the central directory record
60
+ ZIP64VEM : 12, // zip64 version made by
61
+ ZIP64VER : 14, // zip64 version needed to extract
62
+ ZIP64DSK : 16, // zip64 number of this disk
63
+ ZIP64DSKDIR : 20, // number of the disk with the start of the record directory
64
+ ZIP64SUB : 24, // number of entries on this disk
65
+ ZIP64TOT : 32, // total number of entries
66
+ ZIP64SIZB : 40, // zip64 central directory size in bytes
67
+ ZIP64OFF : 48, // offset of start of central directory with respect to the starting disk number
68
+ ZIP64EXTRA : 56, // extensible data sector
69
+
70
+ /* Compression methods */
71
+ STORED : 0, // no compression
72
+ SHRUNK : 1, // shrunk
73
+ REDUCED1 : 2, // reduced with compression factor 1
74
+ REDUCED2 : 3, // reduced with compression factor 2
75
+ REDUCED3 : 4, // reduced with compression factor 3
76
+ REDUCED4 : 5, // reduced with compression factor 4
77
+ IMPLODED : 6, // imploded
78
+ // 7 reserved for Tokenizing compression algorithm
79
+ DEFLATED : 8, // deflated
80
+ ENHANCED_DEFLATED: 9, // enhanced deflated
81
+ PKWARE : 10,// PKWare DCL imploded
82
+ // 11 reserved by PKWARE
83
+ BZIP2 : 12, // compressed using BZIP2
84
+ // 13 reserved by PKWARE
85
+ LZMA : 14, // LZMA
86
+ // 15-17 reserved by PKWARE
87
+ IBM_TERSE : 18, // compressed using IBM TERSE
88
+ IBM_LZ77 : 19, // IBM LZ77 z
89
+ AES_ENCRYPT : 99, // WinZIP AES encryption method
90
+
91
+ /* General purpose bit flag */
92
+ // values can obtained with expression 2**bitnr
93
+ FLG_ENC : 1, // Bit 0: encrypted file
94
+ FLG_COMP1 : 2, // Bit 1, compression option
95
+ FLG_COMP2 : 4, // Bit 2, compression option
96
+ FLG_DESC : 8, // Bit 3, data descriptor
97
+ FLG_ENH : 16, // Bit 4, enhanced deflating
98
+ FLG_PATCH : 32, // Bit 5, indicates that the file is compressed patched data.
99
+ FLG_STR : 64, // Bit 6, strong encryption (patented)
100
+ // Bits 7-10: Currently unused.
101
+ FLG_EFS : 2048, // Bit 11: Language encoding flag (EFS)
102
+ // Bit 12: Reserved by PKWARE for enhanced compression.
103
+ // Bit 13: encrypted the Central Directory (patented).
104
+ // Bits 14-15: Reserved by PKWARE.
105
+ FLG_MSK : 4096, // mask header values
106
+
107
+ /* Load type */
108
+ FILE : 2,
109
+ BUFFER : 1,
110
+ NONE : 0,
111
+
112
+ /* 4.5 Extensible data fields */
113
+ EF_ID : 0,
114
+ EF_SIZE : 2,
115
+
116
+ /* Header IDs */
117
+ ID_ZIP64 : 0x0001,
118
+ ID_AVINFO : 0x0007,
119
+ ID_PFS : 0x0008,
120
+ ID_OS2 : 0x0009,
121
+ ID_NTFS : 0x000a,
122
+ ID_OPENVMS : 0x000c,
123
+ ID_UNIX : 0x000d,
124
+ ID_FORK : 0x000e,
125
+ ID_PATCH : 0x000f,
126
+ ID_X509_PKCS7 : 0x0014,
127
+ ID_X509_CERTID_F : 0x0015,
128
+ ID_X509_CERTID_C : 0x0016,
129
+ ID_STRONGENC : 0x0017,
130
+ ID_RECORD_MGT : 0x0018,
131
+ ID_X509_PKCS7_RL : 0x0019,
132
+ ID_IBM1 : 0x0065,
133
+ ID_IBM2 : 0x0066,
134
+ ID_POSZIP : 0x4690,
135
+
136
+ EF_ZIP64_OR_32 : 0xffffffff,
137
+ EF_ZIP64_OR_16 : 0xffff,
138
+ EF_ZIP64_SUNCOMP : 0,
139
+ EF_ZIP64_SCOMP : 8,
140
+ EF_ZIP64_RHO : 16,
141
+ EF_ZIP64_DSN : 24
142
+ };
@@ -0,0 +1,5 @@
1
+ module.exports = {
2
+ efs: true,
3
+ encode: (data) => Buffer.from(data, "utf8"),
4
+ decode: (data) => data.toString("utf8")
5
+ };
@@ -0,0 +1,63 @@
1
+ const errors = {
2
+ /* Header error messages */
3
+ INVALID_LOC: "Invalid LOC header (bad signature)",
4
+ INVALID_CEN: "Invalid CEN header (bad signature)",
5
+ INVALID_END: "Invalid END header (bad signature)",
6
+
7
+ /* Descriptor */
8
+ DESCRIPTOR_NOT_EXIST: "No descriptor present",
9
+ DESCRIPTOR_UNKNOWN: "Unknown descriptor format",
10
+ DESCRIPTOR_FAULTY: "Descriptor data is malformed",
11
+
12
+ /* ZipEntry error messages*/
13
+ NO_DATA: "Nothing to decompress",
14
+ BAD_CRC: "CRC32 checksum failed {0}",
15
+ FILE_IN_THE_WAY: "There is a file in the way: {0}",
16
+ UNKNOWN_METHOD: "Invalid/unsupported compression method",
17
+
18
+ /* Inflater error messages */
19
+ AVAIL_DATA: "inflate::Available inflate data did not terminate",
20
+ INVALID_DISTANCE: "inflate::Invalid literal/length or distance code in fixed or dynamic block",
21
+ TO_MANY_CODES: "inflate::Dynamic block code description: too many length or distance codes",
22
+ INVALID_REPEAT_LEN: "inflate::Dynamic block code description: repeat more than specified lengths",
23
+ INVALID_REPEAT_FIRST: "inflate::Dynamic block code description: repeat lengths with no first length",
24
+ INCOMPLETE_CODES: "inflate::Dynamic block code description: code lengths codes incomplete",
25
+ INVALID_DYN_DISTANCE: "inflate::Dynamic block code description: invalid distance code lengths",
26
+ INVALID_CODES_LEN: "inflate::Dynamic block code description: invalid literal/length code lengths",
27
+ INVALID_STORE_BLOCK: "inflate::Stored block length did not match one's complement",
28
+ INVALID_BLOCK_TYPE: "inflate::Invalid block type (type == 3)",
29
+
30
+ /* ADM-ZIP error messages */
31
+ CANT_EXTRACT_FILE: "Could not extract the file",
32
+ CANT_OVERRIDE: "Target file already exists",
33
+ DISK_ENTRY_TOO_LARGE: "Number of disk entries is too large",
34
+ NO_ZIP: "No zip file was loaded",
35
+ NO_ENTRY: "Entry doesn't exist",
36
+ DIRECTORY_CONTENT_ERROR: "A directory cannot have content",
37
+ FILE_NOT_FOUND: 'File not found: "{0}"',
38
+ NOT_IMPLEMENTED: "Not implemented",
39
+ INVALID_FILENAME: "Invalid filename",
40
+ INVALID_FORMAT: "Invalid or unsupported zip format. No END header found",
41
+ INVALID_PASS_PARAM: "Incompatible password parameter",
42
+ WRONG_PASSWORD: "Wrong Password",
43
+
44
+ /* ADM-ZIP */
45
+ COMMENT_TOO_LONG: "Comment is too long", // Comment can be max 65535 bytes long (NOTE: some non-US characters may take more space)
46
+ EXTRA_FIELD_PARSE_ERROR: "Extra field parsing error"
47
+ };
48
+
49
+ // template
50
+ function E(message) {
51
+ return function (...args) {
52
+ if (args.length) { // Allow {0} .. {9} arguments in error message, based on argument number
53
+ message = message.replace(/\{(\d)\}/g, (_, n) => args[n] || '');
54
+ }
55
+
56
+ return new Error('ADM-ZIP: ' + message);
57
+ };
58
+ }
59
+
60
+ // Init errors with template
61
+ for (const msg of Object.keys(errors)) {
62
+ exports[msg] = E(errors[msg]);
63
+ }
@@ -0,0 +1,76 @@
1
+ const pth = require("path");
2
+
3
+ module.exports = function (/*String*/ path, /*Utils object*/ { fs }) {
4
+ var _path = path || "",
5
+ _obj = newAttr(),
6
+ _stat = null;
7
+
8
+ function newAttr() {
9
+ return {
10
+ directory: false,
11
+ readonly: false,
12
+ hidden: false,
13
+ executable: false,
14
+ mtime: 0,
15
+ atime: 0
16
+ };
17
+ }
18
+
19
+ if (_path && fs.existsSync(_path)) {
20
+ _stat = fs.statSync(_path);
21
+ _obj.directory = _stat.isDirectory();
22
+ _obj.mtime = _stat.mtime;
23
+ _obj.atime = _stat.atime;
24
+ _obj.executable = (0o111 & _stat.mode) !== 0; // file is executable who ever har right not just owner
25
+ _obj.readonly = (0o200 & _stat.mode) === 0; // readonly if owner has no write right
26
+ _obj.hidden = pth.basename(_path)[0] === ".";
27
+ } else {
28
+ console.warn("Invalid path: " + _path);
29
+ }
30
+
31
+ return {
32
+ get directory() {
33
+ return _obj.directory;
34
+ },
35
+
36
+ get readOnly() {
37
+ return _obj.readonly;
38
+ },
39
+
40
+ get hidden() {
41
+ return _obj.hidden;
42
+ },
43
+
44
+ get mtime() {
45
+ return _obj.mtime;
46
+ },
47
+
48
+ get atime() {
49
+ return _obj.atime;
50
+ },
51
+
52
+ get executable() {
53
+ return _obj.executable;
54
+ },
55
+
56
+ decodeAttributes: function () {},
57
+
58
+ encodeAttributes: function () {},
59
+
60
+ toJSON: function () {
61
+ return {
62
+ path: _path,
63
+ isDirectory: _obj.directory,
64
+ isReadOnly: _obj.readonly,
65
+ isHidden: _obj.hidden,
66
+ isExecutable: _obj.executable,
67
+ mTime: _obj.mtime,
68
+ aTime: _obj.atime
69
+ };
70
+ },
71
+
72
+ toString: function () {
73
+ return JSON.stringify(this.toJSON(), null, "\t");
74
+ }
75
+ };
76
+ };
@@ -0,0 +1,5 @@
1
+ module.exports = require("./utils");
2
+ module.exports.Constants = require("./constants");
3
+ module.exports.Errors = require("./errors");
4
+ module.exports.FileAttr = require("./fattr");
5
+ module.exports.decoder = require("./decoder");
@@ -0,0 +1,339 @@
1
+ const fsystem = require("fs");
2
+ const pth = require("path");
3
+ const Constants = require("./constants");
4
+ const Errors = require("./errors");
5
+ const isWin = typeof process === "object" && "win32" === process.platform;
6
+
7
+ const is_Obj = (obj) => typeof obj === "object" && obj !== null;
8
+
9
+ // generate CRC32 lookup table
10
+ const crcTable = new Uint32Array(256).map((t, c) => {
11
+ for (let k = 0; k < 8; k++) {
12
+ if ((c & 1) !== 0) {
13
+ c = 0xedb88320 ^ (c >>> 1);
14
+ } else {
15
+ c >>>= 1;
16
+ }
17
+ }
18
+ return c >>> 0;
19
+ });
20
+
21
+ // UTILS functions
22
+
23
+ function Utils(opts) {
24
+ this.sep = pth.sep;
25
+ this.fs = fsystem;
26
+
27
+ if (is_Obj(opts)) {
28
+ // custom filesystem
29
+ if (is_Obj(opts.fs) && typeof opts.fs.statSync === "function") {
30
+ this.fs = opts.fs;
31
+ }
32
+ }
33
+ }
34
+
35
+ module.exports = Utils;
36
+
37
+ // INSTANTIABLE functions
38
+
39
+ Utils.prototype.makeDir = function (/*String*/ folder) {
40
+ const self = this;
41
+
42
+ // Sync - make directories tree
43
+ function mkdirSync(/*String*/ fpath) {
44
+ let resolvedPath = fpath.split(self.sep)[0];
45
+ fpath.split(self.sep).forEach(function (name) {
46
+ if (!name || name.substr(-1, 1) === ":") return;
47
+ resolvedPath += self.sep + name;
48
+ var stat;
49
+ try {
50
+ stat = self.fs.statSync(resolvedPath);
51
+ } catch (e) {
52
+ if (e.message && e.message.startsWith('ENOENT')) {
53
+ self.fs.mkdirSync(resolvedPath);
54
+ } else {
55
+ throw e;
56
+ }
57
+ }
58
+ if (stat && stat.isFile()) throw Errors.FILE_IN_THE_WAY(`"${resolvedPath}"`);
59
+ });
60
+ }
61
+
62
+ mkdirSync(folder);
63
+ };
64
+
65
+ Utils.prototype.writeFileTo = function (/*String*/ path, /*Buffer*/ content, /*Boolean*/ overwrite, /*Number*/ attr) {
66
+ const self = this;
67
+ if (self.fs.existsSync(path)) {
68
+ if (!overwrite) return false; // cannot overwrite
69
+
70
+ var stat = self.fs.statSync(path);
71
+ if (stat.isDirectory()) {
72
+ return false;
73
+ }
74
+ }
75
+ var folder = pth.dirname(path);
76
+ if (!self.fs.existsSync(folder)) {
77
+ self.makeDir(folder);
78
+ }
79
+
80
+ var fd;
81
+ try {
82
+ fd = self.fs.openSync(path, "w", 0o666); // 0666
83
+ } catch (e) {
84
+ self.fs.chmodSync(path, 0o666);
85
+ fd = self.fs.openSync(path, "w", 0o666);
86
+ }
87
+ if (fd) {
88
+ try {
89
+ self.fs.writeSync(fd, content, 0, content.length, 0);
90
+ } finally {
91
+ self.fs.closeSync(fd);
92
+ }
93
+ }
94
+ self.fs.chmodSync(path, attr || 0o666);
95
+ return true;
96
+ };
97
+
98
+ Utils.prototype.writeFileToAsync = function (/*String*/ path, /*Buffer*/ content, /*Boolean*/ overwrite, /*Number*/ attr, /*Function*/ callback) {
99
+ if (typeof attr === "function") {
100
+ callback = attr;
101
+ attr = undefined;
102
+ }
103
+
104
+ const self = this;
105
+
106
+ self.fs.exists(path, function (exist) {
107
+ if (exist && !overwrite) return callback(false);
108
+
109
+ self.fs.stat(path, function (err, stat) {
110
+ if (exist && stat.isDirectory()) {
111
+ return callback(false);
112
+ }
113
+
114
+ var folder = pth.dirname(path);
115
+ self.fs.exists(folder, function (exists) {
116
+ if (!exists) self.makeDir(folder);
117
+
118
+ self.fs.open(path, "w", 0o666, function (err, fd) {
119
+ if (err) {
120
+ self.fs.chmod(path, 0o666, function () {
121
+ self.fs.open(path, "w", 0o666, function (err, fd) {
122
+ self.fs.write(fd, content, 0, content.length, 0, function () {
123
+ self.fs.close(fd, function () {
124
+ self.fs.chmod(path, attr || 0o666, function () {
125
+ callback(true);
126
+ });
127
+ });
128
+ });
129
+ });
130
+ });
131
+ } else if (fd) {
132
+ self.fs.write(fd, content, 0, content.length, 0, function () {
133
+ self.fs.close(fd, function () {
134
+ self.fs.chmod(path, attr || 0o666, function () {
135
+ callback(true);
136
+ });
137
+ });
138
+ });
139
+ } else {
140
+ self.fs.chmod(path, attr || 0o666, function () {
141
+ callback(true);
142
+ });
143
+ }
144
+ });
145
+ });
146
+ });
147
+ });
148
+ };
149
+
150
+ Utils.prototype.findFiles = function (/*String*/ path) {
151
+ const self = this;
152
+
153
+ function findSync(/*String*/ dir, /*RegExp*/ pattern, /*Boolean*/ recursive) {
154
+ if (typeof pattern === "boolean") {
155
+ recursive = pattern;
156
+ pattern = undefined;
157
+ }
158
+ let files = [];
159
+ self.fs.readdirSync(dir).forEach(function (file) {
160
+ const path = pth.join(dir, file);
161
+ const stat = self.fs.statSync(path);
162
+
163
+ if (!pattern || pattern.test(path)) {
164
+ files.push(pth.normalize(path) + (stat.isDirectory() ? self.sep : ""));
165
+ }
166
+
167
+ if (stat.isDirectory() && recursive) files = files.concat(findSync(path, pattern, recursive));
168
+ });
169
+ return files;
170
+ }
171
+
172
+ return findSync(path, undefined, true);
173
+ };
174
+
175
+ /**
176
+ * Callback for showing if everything was done.
177
+ *
178
+ * @callback filelistCallback
179
+ * @param {Error} err - Error object
180
+ * @param {string[]} list - was request fully completed
181
+ */
182
+
183
+ /**
184
+ *
185
+ * @param {string} dir
186
+ * @param {filelistCallback} cb
187
+ */
188
+ Utils.prototype.findFilesAsync = function (dir, cb) {
189
+ const self = this;
190
+ let results = [];
191
+ self.fs.readdir(dir, function (err, list) {
192
+ if (err) return cb(err);
193
+ let list_length = list.length;
194
+ if (!list_length) return cb(null, results);
195
+ list.forEach(function (file) {
196
+ file = pth.join(dir, file);
197
+ self.fs.stat(file, function (err, stat) {
198
+ if (err) return cb(err);
199
+ if (stat) {
200
+ results.push(pth.normalize(file) + (stat.isDirectory() ? self.sep : ""));
201
+ if (stat.isDirectory()) {
202
+ self.findFilesAsync(file, function (err, res) {
203
+ if (err) return cb(err);
204
+ results = results.concat(res);
205
+ if (!--list_length) cb(null, results);
206
+ });
207
+ } else {
208
+ if (!--list_length) cb(null, results);
209
+ }
210
+ }
211
+ });
212
+ });
213
+ });
214
+ };
215
+
216
+ Utils.prototype.getAttributes = function () {};
217
+
218
+ Utils.prototype.setAttributes = function () {};
219
+
220
+ // STATIC functions
221
+
222
+ // crc32 single update (it is part of crc32)
223
+ Utils.crc32update = function (crc, byte) {
224
+ return crcTable[(crc ^ byte) & 0xff] ^ (crc >>> 8);
225
+ };
226
+
227
+ Utils.crc32 = function (buf) {
228
+ if (typeof buf === "string") {
229
+ buf = Buffer.from(buf, "utf8");
230
+ }
231
+
232
+ let len = buf.length;
233
+ let crc = ~0;
234
+ for (let off = 0; off < len; ) crc = Utils.crc32update(crc, buf[off++]);
235
+ // xor and cast as uint32 number
236
+ return ~crc >>> 0;
237
+ };
238
+
239
+ Utils.methodToString = function (/*Number*/ method) {
240
+ switch (method) {
241
+ case Constants.STORED:
242
+ return "STORED (" + method + ")";
243
+ case Constants.DEFLATED:
244
+ return "DEFLATED (" + method + ")";
245
+ default:
246
+ return "UNSUPPORTED (" + method + ")";
247
+ }
248
+ };
249
+
250
+ /**
251
+ * removes ".." style path elements
252
+ * @param {string} path - fixable path
253
+ * @returns string - fixed filepath
254
+ */
255
+ Utils.canonical = function (/*string*/ path) {
256
+ if (!path) return "";
257
+ // trick normalize think path is absolute
258
+ const safeSuffix = pth.posix.normalize("/" + path.split("\\").join("/"));
259
+ return pth.join(".", safeSuffix);
260
+ };
261
+
262
+ /**
263
+ * fix file names in achive
264
+ * @param {string} path - fixable path
265
+ * @returns string - fixed filepath
266
+ */
267
+
268
+ Utils.zipnamefix = function (path) {
269
+ if (!path) return "";
270
+ // trick normalize think path is absolute
271
+ const safeSuffix = pth.posix.normalize("/" + path.split("\\").join("/"));
272
+ return pth.posix.join(".", safeSuffix);
273
+ };
274
+
275
+ /**
276
+ *
277
+ * @param {Array} arr
278
+ * @param {function} callback
279
+ * @returns
280
+ */
281
+ Utils.findLast = function (arr, callback) {
282
+ if (!Array.isArray(arr)) throw new TypeError("arr is not array");
283
+
284
+ const len = arr.length >>> 0;
285
+ for (let i = len - 1; i >= 0; i--) {
286
+ if (callback(arr[i], i, arr)) {
287
+ return arr[i];
288
+ }
289
+ }
290
+ return void 0;
291
+ };
292
+
293
+ // make abolute paths taking prefix as root folder
294
+ Utils.sanitize = function (/*string*/ prefix, /*string*/ name) {
295
+ prefix = pth.resolve(pth.normalize(prefix));
296
+ var parts = name.split("/");
297
+ for (var i = 0, l = parts.length; i < l; i++) {
298
+ var path = pth.normalize(pth.join(prefix, parts.slice(i, l).join(pth.sep)));
299
+ if (path.indexOf(prefix) === 0) {
300
+ return path;
301
+ }
302
+ }
303
+ return pth.normalize(pth.join(prefix, pth.basename(name)));
304
+ };
305
+
306
+ // converts buffer, Uint8Array, string types to buffer
307
+ Utils.toBuffer = function toBuffer(/*buffer, Uint8Array, string*/ input, /* function */ encoder) {
308
+ if (Buffer.isBuffer(input)) {
309
+ return input;
310
+ } else if (input instanceof Uint8Array) {
311
+ return Buffer.from(input);
312
+ } else {
313
+ // expect string all other values are invalid and return empty buffer
314
+ return typeof input === "string" ? encoder(input) : Buffer.alloc(0);
315
+ }
316
+ };
317
+
318
+ Utils.readBigUInt64LE = function (/*Buffer*/ buffer, /*int*/ index) {
319
+ const lo = buffer.readUInt32LE(index);
320
+ const hi = buffer.readUInt32LE(index + 4);
321
+ return hi * 0x100000000 + lo;
322
+ };
323
+
324
+ Utils.fromDOS2Date = function (val) {
325
+ return new Date(((val >> 25) & 0x7f) + 1980, Math.max(((val >> 21) & 0x0f) - 1, 0), Math.max((val >> 16) & 0x1f, 1), (val >> 11) & 0x1f, (val >> 5) & 0x3f, (val & 0x1f) << 1);
326
+ };
327
+
328
+ Utils.fromDate2DOS = function (val) {
329
+ let date = 0;
330
+ let time = 0;
331
+ if (val.getFullYear() > 1979) {
332
+ date = (((val.getFullYear() - 1980) & 0x7f) << 9) | ((val.getMonth() + 1) << 5) | val.getDate();
333
+ time = (val.getHours() << 11) | (val.getMinutes() << 5) | (val.getSeconds() >> 1);
334
+ }
335
+ return (date << 16) | time;
336
+ };
337
+
338
+ Utils.isWin = isWin; // Do we have windows system
339
+ Utils.crcTable = crcTable;