@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.
- package/.env.example +6 -0
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +4 -0
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/routes-manifest.json +24 -0
- package/.next/standalone/.next/server/app/_global-error.html +2 -2
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/config/create/route.js +4 -3
- package/.next/standalone/.next/server/app/api/config/create/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/config/route.js +5 -4
- package/.next/standalone/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/data/route.js +6 -5
- package/.next/standalone/.next/server/app/api/data/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/evaluation/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/otel/v1/logs/route.js +6 -5
- package/.next/standalone/.next/server/app/api/otel/v1/logs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/otel/v1/traces/route.js +4 -3
- package/.next/standalone/.next/server/app/api/otel/v1/traces/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/proxy/[taskId]/[...path]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/proxy/[taskId]/end/route.js +4 -3
- package/.next/standalone/.next/server/app/api/proxy/[taskId]/end/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/rejudge/route.js +6 -5
- package/.next/standalone/.next/server/app/api/rejudge/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/session/route.js +4 -4
- package/.next/standalone/.next/server/app/api/session/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route.js +6 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-commands/si-optimizer/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-tui/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-tui/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-tui/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-tui/route.js +6 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-tui/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-tui/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/setup/opencode-tui/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/skills/[id]/versions/[version]/download/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/skills/[id]/versions/[version]/route.js +3 -2
- package/.next/standalone/.next/server/app/api/skills/[id]/versions/[version]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/skills/[id]/versions/route.js +5 -2
- package/.next/standalone/.next/server/app/api/skills/[id]/versions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/skills/automation/import/route.js +5 -2
- package/.next/standalone/.next/server/app/api/skills/automation/import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/skills/logs/route.js +6 -5
- package/.next/standalone/.next/server/app/api/skills/logs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/skills/route.js +3 -2
- package/.next/standalone/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route.js +8 -0
- package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/skills/sync-enterprise/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/skills/upload/route.js +5 -2
- package/.next/standalone/.next/server/app/api/skills/upload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/task-stats/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/task-stats/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/task-stats/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/task-stats/route.js +12 -0
- package/.next/standalone/.next/server/app/api/task-stats/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/task-stats/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/task-stats/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/upload/route.js +5 -4
- package/.next/standalone/.next/server/app/api/upload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/details/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/details/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/details/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/details.html +1 -1
- package/.next/standalone/.next/server/app/details.rsc +5 -5
- package/.next/standalone/.next/server/app/details.segments/_full.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/details.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/details.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/details.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/details.segments/details/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/details.segments/details.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +5 -5
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/login/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login.html +1 -1
- package/.next/standalone/.next/server/app/login.rsc +5 -5
- package/.next/standalone/.next/server/app/login.segments/_full.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/skills/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/skills.html +1 -1
- package/.next/standalone/.next/server/app/skills.rsc +5 -5
- package/.next/standalone/.next/server/app/skills.segments/_full.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/skills.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/skills.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/skills.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/skills.segments/skills/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/skills.segments/skills.segment.rsc +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__02ddba88._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__15dbd1f2._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1c95bcde._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__23efcd78._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4a6d443b._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__53775b48._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5444db55._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__591248f3._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5d8178f6._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6261d672._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6923eecf._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6fc12878._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8402dfd1._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__863cf6de._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__89404730._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__98b3de5e._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__9d551ea2._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a4d3d791._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__aa3d72e3._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__aa5c8858._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b11acc79._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ba01f286._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__bd91659b._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c200214a._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c20da96a._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c602c518._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d7fab946._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d8c1808b._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d9b9fecc._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ddf63a21._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e280561d._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e550423c._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f9e66e02._.js +3 -0
- package/.next/standalone/.next/server/chunks/_33c0c729._.js +1 -1
- package/.next/standalone/.next/server/chunks/_3e8b4d8c._.js +1 -1
- package/.next/standalone/.next/server/chunks/_46f10554._.js +3 -0
- package/.next/standalone/.next/server/chunks/_4c806e26._.js +3 -0
- package/.next/standalone/.next/server/chunks/_cd3d20ca._.js +1 -1
- package/.next/standalone/.next/server/chunks/_ddffef3e._.js +1 -1
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_setup_opencode-tui_route_actions_fc8ae29f.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_skills_sync-enterprise_route_actions_0ca45899.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_task-stats_route_actions_983505cd.js +3 -0
- package/.next/standalone/.next/server/chunks/ce889_server_app_api_setup_opencode-commands_si-optimizer_route_actions_fcde30ef.js +3 -0
- package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_c33286ed.js +47 -4
- package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_f42faeee.js +1 -1
- package/.next/standalone/.next/server/chunks/src_98433cb8._.js +237 -0
- package/.next/standalone/.next/server/chunks/src_c8971a2d._.js +57 -8
- package/.next/standalone/.next/server/chunks/src_lib_119f6c7b._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__9ab7cc4a._.js → [root-of-the-server]__082c32a2._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__51073007._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_049876f0._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_09546b95._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_8f5379ab._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_c8c8c083._.js +9 -9
- package/.next/standalone/.next/server/chunks/ssr/{_b121f1ae._.js → _e2faf4f5._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_fd46f439._.js +2 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_dagre-d3-es_src_dagre_index_3582f3d0.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_lodash-es_a1341fea._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_lodash-es_e1de6ed8._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_66a70595._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_login_page_tsx_72f58654._.js +1 -1
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +2 -2
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/{737b8cff3c6a4e30.js → 015467355d3866a3.js} +1 -1
- package/.next/standalone/.next/static/chunks/09f192c9b0609ad8.js +1 -0
- package/.next/standalone/.next/static/chunks/1945a5514fbc393c.css +1 -0
- package/.next/{static/chunks/07c9f28a269c701a.js → standalone/.next/static/chunks/361e4cf1e9a71ccb.js} +1 -1
- package/.next/{static/chunks/5432ce4a494bc74d.js → standalone/.next/static/chunks/60bc50374fd32f20.js} +3 -3
- package/.next/standalone/.next/static/chunks/{251551dcdf74a60d.js → 65bac0880a87bff3.js} +1 -1
- package/.next/standalone/.next/static/chunks/961f7fa606dd26a8.js +1 -0
- package/.next/standalone/.next/static/chunks/bab2ffd4f527acfb.js +1 -0
- package/.next/standalone/.next/static/chunks/c513373e5cfedd5b.js +2 -0
- package/.next/standalone/.next/static/chunks/ca3017e51e817855.js +1 -0
- package/.next/{static/chunks/7e35f4cf2e266022.js → standalone/.next/static/chunks/cb104c3cb4c52833.js} +1 -1
- package/.next/{static/chunks/ff6357067630b168.js → standalone/.next/static/chunks/e13d208072a48316.js} +1 -1
- package/.next/standalone/.next/static/chunks/{e09d9ee16fe90255.js → f786bb68e17b12b4.js} +1 -1
- package/.next/standalone/.next/static/chunks/fc61b990c5ec4ef4.js +109 -0
- package/.next/standalone/node_modules/.prisma/client/edge.js +7 -3
- package/.next/standalone/node_modules/.prisma/client/index-browser.js +4 -0
- package/.next/standalone/node_modules/.prisma/client/index.js +7 -3
- package/.next/standalone/node_modules/.prisma/client/package.json +1 -1
- package/.next/standalone/node_modules/.prisma/client/schema.prisma +26 -22
- package/.next/standalone/node_modules/.prisma/client/wasm.js +4 -0
- package/.next/standalone/node_modules/adm-zip/util/constants.js +142 -0
- package/.next/standalone/node_modules/adm-zip/util/decoder.js +5 -0
- package/.next/standalone/node_modules/adm-zip/util/errors.js +63 -0
- package/.next/standalone/node_modules/adm-zip/util/fattr.js +76 -0
- package/.next/standalone/node_modules/adm-zip/util/index.js +5 -0
- package/.next/standalone/node_modules/adm-zip/util/utils.js +339 -0
- package/.next/standalone/package.json +6 -2
- package/.next/standalone/prisma/schema.prisma +7 -3
- package/.next/standalone/scripts/opencode_plugin.ts +158 -50
- package/.next/standalone/scripts/opencode_tui_plugin.tsx +308 -0
- package/.next/standalone/scripts/si-optimizer.md +5 -0
- package/.next/static/chunks/{737b8cff3c6a4e30.js → 015467355d3866a3.js} +1 -1
- package/.next/static/chunks/09f192c9b0609ad8.js +1 -0
- package/.next/static/chunks/1945a5514fbc393c.css +1 -0
- package/.next/{standalone/.next/static/chunks/07c9f28a269c701a.js → static/chunks/361e4cf1e9a71ccb.js} +1 -1
- package/.next/{standalone/.next/static/chunks/5432ce4a494bc74d.js → static/chunks/60bc50374fd32f20.js} +3 -3
- package/.next/static/chunks/{251551dcdf74a60d.js → 65bac0880a87bff3.js} +1 -1
- package/.next/static/chunks/961f7fa606dd26a8.js +1 -0
- package/.next/static/chunks/bab2ffd4f527acfb.js +1 -0
- package/.next/static/chunks/c513373e5cfedd5b.js +2 -0
- package/.next/static/chunks/ca3017e51e817855.js +1 -0
- package/.next/{standalone/.next/static/chunks/7e35f4cf2e266022.js → static/chunks/cb104c3cb4c52833.js} +1 -1
- package/.next/{standalone/.next/static/chunks/ff6357067630b168.js → static/chunks/e13d208072a48316.js} +1 -1
- package/.next/static/chunks/{e09d9ee16fe90255.js → f786bb68e17b12b4.js} +1 -1
- package/.next/static/chunks/fc61b990c5ec4ef4.js +109 -0
- package/package.json +6 -2
- package/prisma/schema.prisma +7 -3
- package/scripts/activate_telemetry.sh +44 -1
- package/scripts/opencode_plugin.ts +158 -50
- package/scripts/opencode_tui_plugin.tsx +308 -0
- package/scripts/si-optimizer.md +5 -0
- package/scripts/utils.js +0 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1013b265._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1ce5e3b8._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6d8053e2._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b835ea7f._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e2f0baee._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__fc05579d._.js +0 -3
- package/.next/standalone/.next/server/chunks/_41a98bd8._.js +0 -3
- package/.next/standalone/.next/server/chunks/src_497d2ad2._.js +0 -175
- package/.next/standalone/.next/server/chunks/src_lib_12408140._.js +0 -3
- package/.next/standalone/.next/static/chunks/01eddf501c574a44.js +0 -1
- package/.next/standalone/.next/static/chunks/1e782a49beaf489c.js +0 -1
- package/.next/standalone/.next/static/chunks/4071dbec4cf7e72e.js +0 -109
- package/.next/standalone/.next/static/chunks/67bd1a5de2195779.js +0 -1
- package/.next/standalone/.next/static/chunks/a87b5e84254095a5.js +0 -1
- package/.next/standalone/.next/static/chunks/c6bd2818656b1f20.css +0 -1
- package/.next/standalone/.next/static/chunks/dc59a07a8f327b40.js +0 -1
- package/.next/standalone/LICENSE +0 -21
- package/.next/standalone/bin/cli.js +0 -106
- package/.next/standalone/custom-models.example.json +0 -21
- package/.next/standalone/eslint.config.mjs +0 -18
- package/.next/standalone/features/feature-skill-used-jump-link/design/2026-03-18-skill-used-jump-link-design.md +0 -126
- package/.next/standalone/features/feature-skill-used-jump-link/feature.json +0 -32
- package/.next/standalone/features/feature-skill-used-jump-link/issue.md +0 -32
- package/.next/standalone/features/feature-skill-used-jump-link/plans/2026-03-18-skill-used-jump-link.md +0 -528
- package/.next/standalone/next.config.ts +0 -41
- package/.next/standalone/scripts/activate_telemetry.sh +0 -159
- package/.next/standalone/scripts/create_migration_package.sh +0 -124
- package/.next/standalone/scripts/fix_models.js +0 -66
- package/.next/standalone/scripts/init_opengauss.py +0 -284
- package/.next/standalone/scripts/install.js +0 -273
- package/.next/standalone/scripts/logs.js +0 -38
- package/.next/standalone/scripts/otel_data/logs.jsonl +0 -12
- package/.next/standalone/scripts/otel_data/metrics.jsonl +0 -21
- package/.next/standalone/scripts/otel_data/raw_requests.jsonl +0 -8
- package/.next/standalone/scripts/otel_data/raw_requests.jsonl.bak +0 -6
- package/.next/standalone/scripts/otel_receiver.py +0 -580
- package/.next/standalone/scripts/postinstall.js +0 -192
- package/.next/standalone/scripts/publish-npm.js +0 -401
- package/.next/standalone/scripts/restart.js +0 -26
- package/.next/standalone/scripts/restart.sh +0 -138
- package/.next/standalone/scripts/restart_dev.sh +0 -132
- package/.next/standalone/scripts/start.js +0 -291
- package/.next/standalone/scripts/status.js +0 -41
- package/.next/standalone/scripts/stop.js +0 -90
- package/.next/standalone/scripts/sync_skills.js +0 -216
- package/.next/standalone/scripts/utils.js +0 -235
- package/.next/standalone/tests/setup_skill_optimizer.sh +0 -118
- package/.next/standalone/tsconfig.json +0 -34
- package/.next/static/chunks/01eddf501c574a44.js +0 -1
- package/.next/static/chunks/1e782a49beaf489c.js +0 -1
- package/.next/static/chunks/4071dbec4cf7e72e.js +0 -109
- package/.next/static/chunks/67bd1a5de2195779.js +0 -1
- package/.next/static/chunks/a87b5e84254095a5.js +0 -1
- package/.next/static/chunks/c6bd2818656b1f20.css +0 -1
- package/.next/static/chunks/dc59a07a8f327b40.js +0 -1
- /package/.next/standalone/.next/static/{H581Rok68JtPV4bAVVH3l → iKG72t8Hpebb09DcIpKUJ}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{H581Rok68JtPV4bAVVH3l → iKG72t8Hpebb09DcIpKUJ}/_clientMiddlewareManifest.json +0 -0
- /package/.next/standalone/.next/static/{H581Rok68JtPV4bAVVH3l → iKG72t8Hpebb09DcIpKUJ}/_ssgManifest.js +0 -0
- /package/.next/static/{H581Rok68JtPV4bAVVH3l → iKG72t8Hpebb09DcIpKUJ}/_buildManifest.js +0 -0
- /package/.next/static/{H581Rok68JtPV4bAVVH3l → iKG72t8Hpebb09DcIpKUJ}/_clientMiddlewareManifest.json +0 -0
- /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 }
|