@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.
- package/.env.example +55 -5
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +5 -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 +30 -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 +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- 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/auth/organization/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/auth/organization/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/auth/organization/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/auth/organization/route.js +7 -0
- package/.next/standalone/.next/server/app/api/auth/organization/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/auth/organization/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/auth/organization/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/config/create/route.js +2 -2
- 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 +4 -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 +3 -3
- package/.next/standalone/.next/server/app/api/data/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/executions/[executionId]/analyze-match/route.js +1 -1
- package/.next/standalone/.next/server/app/api/executions/[executionId]/analyze-match/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/otel/v1/logs/route.js +3 -3
- 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 +2 -2
- 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]/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/proxy/[taskId]/end/route.js +5 -5
- 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 +3 -3
- package/.next/standalone/.next/server/app/api/rejudge/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/session/route.js +3 -3
- package/.next/standalone/.next/server/app/api/session/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/settings/route.js +1 -1
- package/.next/standalone/.next/server/app/api/settings/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]/parse-flow/route.js +1 -1
- package/.next/standalone/.next/server/app/api/skills/[id]/versions/[version]/parse-flow/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/automation/import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/skills/logs/route.js +2 -2
- 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/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 +11 -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 +2 -2
- 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 +4 -4
- package/.next/standalone/.next/server/app/details.segments/_full.segment.rsc +4 -4
- 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 +4 -4
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +4 -4
- 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 +4 -4
- package/.next/standalone/.next/server/app/login.segments/_full.segment.rsc +4 -4
- 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 +4 -4
- package/.next/standalone/.next/server/app/skills.segments/_full.segment.rsc +4 -4
- 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 +5 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__02ddba88._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__15dbd1f2._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1ce5e3b8._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4a6d443b._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__53775b48._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5444db55._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6923eecf._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6d8053e2._.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 +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a4d3d791._.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]__bd91659b._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c200214a._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c20da96a._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d7fab946._.js +3 -0
- 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 +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ddf63a21._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f9e66e02._.js +3 -0
- package/.next/standalone/.next/server/chunks/_3e8b4d8c._.js +1 -1
- package/.next/standalone/.next/server/chunks/_41a98bd8._.js +1 -1
- 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_auth_organization_route_actions_f58710b7.js +3 -0
- 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 -43
- 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 +175 -0
- package/.next/standalone/.next/server/chunks/src_lib_12408140._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__5d576168._.js → [root-of-the-server]__40353d98._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__89851212._.js → [root-of-the-server]__480fcd92._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__28978655._.js → [root-of-the-server]__48f8fbcb._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__a5ef0b61._.js → [root-of-the-server]__49921b2a._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__317833f9._.js → [root-of-the-server]__593be3d6._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__ca101543._.js → [root-of-the-server]__5e9ff641._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__90641614._.js → [root-of-the-server]__66cc6ff2._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__cda1e286._.js → [root-of-the-server]__9889bdc8._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__42ba97b6._.js → [root-of-the-server]__9905ca7a._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__9ab7cc4a._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__7bb97139._.js → [root-of-the-server]__9d6b7d48._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__6b8b9bb9._.js → [root-of-the-server]__b8edc8c6._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__b9972e88._.js → [root-of-the-server]__d691ecb0._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__52851239._.js → [root-of-the-server]__e5ddfd15._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__9630dedf._.js → [root-of-the-server]__f72f330e._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__99ab66d7._.js → [root-of-the-server]__f843e085._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__d424fa04._.js → [root-of-the-server]__fd69d276._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_7688d7cd._.js → _049876f0._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_72a74a0c._.js → _09546b95._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_8f5379ab._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_cf1f3d2c._.js → _b121f1ae._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_c8c8c083._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_fd46f439._.js +2 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_f2653232._.js → node_modules_039c6a11._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_da87f0e3._.js → node_modules_0d3530cd._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_afb1ecef._.js → node_modules_0e883565._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_8d9e56b7._.js → node_modules_11dbf165._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_76d6c533._.js → node_modules_2041c122._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_b007145b._.js → node_modules_235267bb._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_11d81adf._.js → node_modules_25dfb0ba._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_4ea9b27b._.js → node_modules_2b12c669._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_cc19e85c._.js → node_modules_32996880._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_62621b34._.js → node_modules_35885fe9._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_ed4150ad._.js → node_modules_38a95353._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_f596a14c._.js → node_modules_3a317c51._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_fddab329._.js → node_modules_44966ab2._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_e272ac31._.js → node_modules_53af751a._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_abf4f826._.js → node_modules_5f539891._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_86b6ffa4._.js → node_modules_60402210._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_3769cd60._.js → node_modules_60eccfb6._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_fdf808cf._.js → node_modules_632c098c._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_442994dc._.js → node_modules_6c42f75c._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_5b6dbbc3._.js → node_modules_6fbe276d._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_6716e25d._.js → node_modules_740e9d59._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_ed1f1845._.js → node_modules_7a3d551c._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_4f41f172._.js → node_modules_861cb9cf._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_2aaea4ea._.js → node_modules_8a892761._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_3964c298._.js → node_modules_a5a4946e._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_3d9afa91._.js → node_modules_a712c937._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_330b9e3c._.js → node_modules_a8c276dd._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_ad69a9e4._.js → node_modules_acc9d529._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_8301968d._.js → node_modules_ad07ab39._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_1d88c7cc._.js → node_modules_b38efa22._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_e20e8c2a._.js → node_modules_b4ef036d._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_2e206c58._.js → node_modules_b6bad701._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_c90fa812._.js → node_modules_b9810024._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_db8af6e3._.js → node_modules_b9ad808d._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_7287189a._.js → node_modules_bc287d9f._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_2e38bc5c._.js → node_modules_c6469d93._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_c657890f._.js → node_modules_c704e802._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_b8803ba6._.js → node_modules_cda46cfc._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_aa6da06c._.js → node_modules_cf171d0c._.js} +1 -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_2d9e03d1._.js → node_modules_e8927fc2._.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_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/1e782a49beaf489c.js +1 -0
- package/.next/standalone/.next/static/chunks/{01eddf501c574a44.js → 4ee8dc41c9f15b7b.js} +1 -1
- package/.next/standalone/.next/static/chunks/67bd1a5de2195779.js +1 -0
- package/.next/standalone/.next/static/chunks/{737b8cff3c6a4e30.js → 9445b2873a413c58.js} +1 -1
- package/.next/standalone/.next/static/chunks/94dfb15df65ef720.js +2 -0
- package/.next/standalone/.next/static/chunks/9d1c5c3494fa53de.js +109 -0
- package/.next/standalone/.next/static/chunks/c6bd2818656b1f20.css +1 -0
- package/.next/standalone/.next/static/chunks/{e09d9ee16fe90255.js → cd0fde15dc0dfcca.js} +1 -1
- package/.next/standalone/.next/static/chunks/{6d12c79948c7e0ac.js → dc59a07a8f327b40.js} +1 -1
- package/.next/standalone/.next/static/chunks/{ff6357067630b168.js → e13d208072a48316.js} +1 -1
- package/.next/standalone/node_modules/.prisma/client/edge.js +6 -3
- package/.next/standalone/node_modules/.prisma/client/index-browser.js +3 -0
- package/.next/standalone/node_modules/.prisma/client/index.js +6 -3
- package/.next/standalone/node_modules/.prisma/client/package.json +1 -1
- package/.next/standalone/node_modules/.prisma/client/schema.prisma +12 -9
- package/.next/standalone/node_modules/.prisma/client/wasm.js +3 -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 +3 -0
- package/.next/standalone/scripts/opencode_plugin.ts +279 -40
- package/.next/standalone/scripts/opencode_tui_plugin.tsx +308 -0
- package/.next/standalone/scripts/si-optimizer.md +5 -0
- package/.next/static/chunks/1e782a49beaf489c.js +1 -0
- package/.next/static/chunks/{01eddf501c574a44.js → 4ee8dc41c9f15b7b.js} +1 -1
- package/.next/static/chunks/67bd1a5de2195779.js +1 -0
- package/.next/static/chunks/{737b8cff3c6a4e30.js → 9445b2873a413c58.js} +1 -1
- package/.next/static/chunks/94dfb15df65ef720.js +2 -0
- package/.next/static/chunks/9d1c5c3494fa53de.js +109 -0
- package/.next/static/chunks/c6bd2818656b1f20.css +1 -0
- package/.next/static/chunks/{e09d9ee16fe90255.js → cd0fde15dc0dfcca.js} +1 -1
- package/.next/static/chunks/{6d12c79948c7e0ac.js → dc59a07a8f327b40.js} +1 -1
- package/.next/static/chunks/{ff6357067630b168.js → e13d208072a48316.js} +1 -1
- package/package.json +6 -2
- package/prisma/schema.prisma +3 -0
- package/scripts/activate_telemetry.sh +44 -1
- package/scripts/opencode_plugin.ts +279 -40
- 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]__0fceba52._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__13132848._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__30769f6e._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__426bc4ab._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__610d08bc._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__75e3674c._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__761462f8._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__9aa700a4._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b7ad2649._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c00180dd._.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]__ed8f9b78._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__fc05579d._.js +0 -3
- package/.next/standalone/.next/server/chunks/src_497d2ad2._.js +0 -175
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__082c32a2._.js +0 -3
- package/.next/standalone/.next/static/chunks/222a937a6c859036.js +0 -1
- package/.next/standalone/.next/static/chunks/2a3dd49367e2c198.js +0 -1
- package/.next/standalone/.next/static/chunks/3e33f7adc10a38d3.js +0 -109
- package/.next/standalone/.next/static/chunks/428e6cf64b115e9d.css +0 -1
- package/.next/standalone/.next/static/chunks/62129f27f303a5ba.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 -29
- 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/222a937a6c859036.js +0 -1
- package/.next/static/chunks/2a3dd49367e2c198.js +0 -1
- package/.next/static/chunks/3e33f7adc10a38d3.js +0 -109
- package/.next/static/chunks/428e6cf64b115e9d.css +0 -1
- package/.next/static/chunks/62129f27f303a5ba.js +0 -1
- /package/.next/standalone/.next/static/{Eytv_Fh4x2HPaupjXiAYj → 0uvhCJooDO_gMNlKOaHwB}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{Eytv_Fh4x2HPaupjXiAYj → 0uvhCJooDO_gMNlKOaHwB}/_clientMiddlewareManifest.json +0 -0
- /package/.next/standalone/.next/static/{Eytv_Fh4x2HPaupjXiAYj → 0uvhCJooDO_gMNlKOaHwB}/_ssgManifest.js +0 -0
- /package/.next/static/{Eytv_Fh4x2HPaupjXiAYj → 0uvhCJooDO_gMNlKOaHwB}/_buildManifest.js +0 -0
- /package/.next/static/{Eytv_Fh4x2HPaupjXiAYj → 0uvhCJooDO_gMNlKOaHwB}/_clientMiddlewareManifest.json +0 -0
- /package/.next/static/{Eytv_Fh4x2HPaupjXiAYj → 0uvhCJooDO_gMNlKOaHwB}/_ssgManifest.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@witty-ai/skill-insight",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0-beta",
|
|
4
4
|
"description": "Agent Skill 评估与观测平台 — 量化评估 Skills 在 Agent 上的实际运行效果",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -21,12 +21,14 @@
|
|
|
21
21
|
"dev": "next dev",
|
|
22
22
|
"build": "next build",
|
|
23
23
|
"start": "next start",
|
|
24
|
-
"lint": "eslint"
|
|
24
|
+
"lint": "eslint",
|
|
25
|
+
"test": "node --import tsx --test \"test/**/*.test.ts\""
|
|
25
26
|
},
|
|
26
27
|
"dependencies": {
|
|
27
28
|
"@prisma/client": "5.22.0",
|
|
28
29
|
"@types/archiver": "^7.0.0",
|
|
29
30
|
"@types/uuid": "^11.0.0",
|
|
31
|
+
"adm-zip": "^0.5.10",
|
|
30
32
|
"archiver": "7.0.1",
|
|
31
33
|
"chokidar": "^5.0.0",
|
|
32
34
|
"dotenv": "^17.3.1",
|
|
@@ -49,12 +51,14 @@
|
|
|
49
51
|
"xlsx": "^0.18.5"
|
|
50
52
|
},
|
|
51
53
|
"devDependencies": {
|
|
54
|
+
"@types/adm-zip": "^0.5.8",
|
|
52
55
|
"@types/node": "^20",
|
|
53
56
|
"@types/pg": "^8.18.0",
|
|
54
57
|
"@types/react": "^19",
|
|
55
58
|
"@types/react-dom": "^19",
|
|
56
59
|
"eslint": "^9",
|
|
57
60
|
"eslint-config-next": "16.1.4",
|
|
61
|
+
"tsx": "^4.20.5",
|
|
58
62
|
"typescript": "^5"
|
|
59
63
|
}
|
|
60
64
|
}
|
package/prisma/schema.prisma
CHANGED
|
@@ -34,6 +34,8 @@ model SkillVersion {
|
|
|
34
34
|
id String @id @default(cuid())
|
|
35
35
|
skillId String
|
|
36
36
|
version Int
|
|
37
|
+
semanticVersion String? // 语义化版本号,用于企业同步
|
|
38
|
+
enterpriseSkillId Int? // 企业skill的id,用于删除同步
|
|
37
39
|
content String
|
|
38
40
|
assetPath String?
|
|
39
41
|
files String?
|
|
@@ -68,6 +70,7 @@ model Execution {
|
|
|
68
70
|
cacheReadInputTokens Int?
|
|
69
71
|
cacheCreationInputTokens Int?
|
|
70
72
|
maxSingleCallTokens Int?
|
|
73
|
+
reasoningTokens Int?
|
|
71
74
|
timestamp DateTime @default(now())
|
|
72
75
|
model String?
|
|
73
76
|
finalResult String?
|
|
@@ -30,14 +30,49 @@ fi
|
|
|
30
30
|
# --- 2. Setup OpenCode Plugin (Priority) ---
|
|
31
31
|
OPENCODE_PLUGIN_SRC="$SCRIPTS_DIR/opencode_plugin.ts"
|
|
32
32
|
OPENCODE_PLUGIN_DEST="$HOME/.opencode/plugins/Witty-Skill-Insight.ts"
|
|
33
|
+
OPENCODE_TUI_PLUGIN_SRC="$SCRIPTS_DIR/opencode_tui_plugin.tsx"
|
|
34
|
+
OPENCODE_TUI_PLUGIN_DEST="$HOME/.opencode/plugins/Witty-Skill-Insight.tui.tsx"
|
|
35
|
+
OPENCODE_CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/opencode"
|
|
36
|
+
OPENCODE_CONFIG_PLUGIN_DIR="$OPENCODE_CONFIG_DIR/plugins"
|
|
33
37
|
|
|
34
38
|
if [ -f "$OPENCODE_PLUGIN_SRC" ]; then
|
|
35
39
|
echo "🛠️ Syncing OpenCode Plugin..."
|
|
36
40
|
|
|
37
41
|
# Create plugin directory
|
|
38
42
|
mkdir -p "$HOME/.opencode/plugins"
|
|
43
|
+
mkdir -p "$OPENCODE_CONFIG_PLUGIN_DIR"
|
|
39
44
|
cp "$OPENCODE_PLUGIN_SRC" "$OPENCODE_PLUGIN_DEST"
|
|
45
|
+
cp "$OPENCODE_PLUGIN_SRC" "$OPENCODE_CONFIG_PLUGIN_DIR/Witty-Skill-Insight.ts"
|
|
40
46
|
echo "✅ OpenCode Plugin installed to $OPENCODE_PLUGIN_DEST"
|
|
47
|
+
|
|
48
|
+
if [ -f "$OPENCODE_TUI_PLUGIN_SRC" ]; then
|
|
49
|
+
cp "$OPENCODE_TUI_PLUGIN_SRC" "$OPENCODE_TUI_PLUGIN_DEST"
|
|
50
|
+
cp "$OPENCODE_TUI_PLUGIN_SRC" "$OPENCODE_CONFIG_PLUGIN_DIR/Witty-Skill-Insight.tui.tsx"
|
|
51
|
+
echo "✅ OpenCode TUI Plugin installed to $OPENCODE_TUI_PLUGIN_DEST"
|
|
52
|
+
if command -v node &> /dev/null; then
|
|
53
|
+
export TUI_PLUGIN_PATH="$OPENCODE_CONFIG_PLUGIN_DIR/Witty-Skill-Insight.tui.tsx"
|
|
54
|
+
export TUI_CONFIG_FILE="$OPENCODE_CONFIG_DIR/tui.json"
|
|
55
|
+
node - <<'NODE'
|
|
56
|
+
const fs = require("fs");
|
|
57
|
+
const path = require("path");
|
|
58
|
+
const file = process.env.TUI_CONFIG_FILE;
|
|
59
|
+
const pluginPath = process.env.TUI_PLUGIN_PATH;
|
|
60
|
+
let data = {};
|
|
61
|
+
try {
|
|
62
|
+
if (fs.existsSync(file)) {
|
|
63
|
+
const text = fs.readFileSync(file, "utf8");
|
|
64
|
+
data = text && text.trim() ? JSON.parse(text) : {};
|
|
65
|
+
}
|
|
66
|
+
} catch {}
|
|
67
|
+
if (!data || typeof data !== "object") data = {};
|
|
68
|
+
const list = Array.isArray(data.plugin) ? data.plugin.slice() : [];
|
|
69
|
+
if (pluginPath && !list.includes(pluginPath)) list.push(pluginPath);
|
|
70
|
+
data.plugin = list;
|
|
71
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
72
|
+
fs.writeFileSync(file, JSON.stringify(data, null, 2));
|
|
73
|
+
NODE
|
|
74
|
+
fi
|
|
75
|
+
fi
|
|
41
76
|
|
|
42
77
|
# --- 2.1 Setup Skill-Insight Config (~/.skill-insight/.env) ---
|
|
43
78
|
SKILL_INSIGHT_CONFIG_DIR="$HOME/.skill-insight"
|
|
@@ -46,10 +81,12 @@ if [ -f "$OPENCODE_PLUGIN_SRC" ]; then
|
|
|
46
81
|
|
|
47
82
|
EXISTING_KEY=""
|
|
48
83
|
EXISTING_HOST=""
|
|
84
|
+
EXISTING_SHOW_TASK_STATS=""
|
|
49
85
|
if [ -f "$SKILL_INSIGHT_CONFIG_FILE" ]; then
|
|
50
86
|
# match only UNCOMMENTED lines
|
|
51
87
|
EXISTING_KEY=$(grep '^SKILL_INSIGHT_API_KEY=' "$SKILL_INSIGHT_CONFIG_FILE" | head -n 1 | cut -d'=' -f2-)
|
|
52
88
|
EXISTING_HOST=$(grep '^SKILL_INSIGHT_HOST=' "$SKILL_INSIGHT_CONFIG_FILE" | head -n 1 | cut -d'=' -f2-)
|
|
89
|
+
EXISTING_SHOW_TASK_STATS=$(grep '^SKILL_INSIGHT_SHOW_TASK_STATS=' "$SKILL_INSIGHT_CONFIG_FILE" | head -n 1 | cut -d'=' -f2-)
|
|
53
90
|
fi
|
|
54
91
|
|
|
55
92
|
# API Key Selection Logic
|
|
@@ -89,13 +126,19 @@ if [ -f "$OPENCODE_PLUGIN_SRC" ]; then
|
|
|
89
126
|
if [ -z "$API_KEY" ]; then
|
|
90
127
|
echo "⚠️ Warning: No API Key provided. Data reporting will fail."
|
|
91
128
|
fi
|
|
129
|
+
|
|
130
|
+
FINAL_SHOW_TASK_STATS="$EXISTING_SHOW_TASK_STATS"
|
|
131
|
+
if [ -z "$FINAL_SHOW_TASK_STATS" ]; then
|
|
132
|
+
FINAL_SHOW_TASK_STATS="true"
|
|
133
|
+
fi
|
|
92
134
|
|
|
93
135
|
echo "⚙️ Syncing configuration to $SKILL_INSIGHT_CONFIG_FILE..."
|
|
94
136
|
touch "$SKILL_INSIGHT_CONFIG_FILE"
|
|
95
137
|
cp "$SKILL_INSIGHT_CONFIG_FILE" "${SKILL_INSIGHT_CONFIG_FILE}.bak"
|
|
96
|
-
grep -v "^SKILL_INSIGHT_API_KEY=" "${SKILL_INSIGHT_CONFIG_FILE}.bak" | grep -v "^SKILL_INSIGHT_HOST=" > "$SKILL_INSIGHT_CONFIG_FILE"
|
|
138
|
+
grep -v "^SKILL_INSIGHT_API_KEY=" "${SKILL_INSIGHT_CONFIG_FILE}.bak" | grep -v "^SKILL_INSIGHT_HOST=" | grep -v "^SKILL_INSIGHT_SHOW_TASK_STATS=" > "$SKILL_INSIGHT_CONFIG_FILE"
|
|
97
139
|
echo "SKILL_INSIGHT_API_KEY=$API_KEY" >> "$SKILL_INSIGHT_CONFIG_FILE"
|
|
98
140
|
echo "SKILL_INSIGHT_HOST=$FINAL_HOST" >> "$SKILL_INSIGHT_CONFIG_FILE"
|
|
141
|
+
echo "SKILL_INSIGHT_SHOW_TASK_STATS=$FINAL_SHOW_TASK_STATS" >> "$SKILL_INSIGHT_CONFIG_FILE"
|
|
99
142
|
rm "${SKILL_INSIGHT_CONFIG_FILE}.bak"
|
|
100
143
|
echo "✅ Configuration updated (Other settings preserved)."
|
|
101
144
|
|
|
@@ -18,9 +18,151 @@ function logDebug(msg) {
|
|
|
18
18
|
|
|
19
19
|
// Global store
|
|
20
20
|
let sessionStore = new Map();
|
|
21
|
-
let uploadedSessions = new
|
|
21
|
+
let uploadedSessions = new Map(); // sessionId -> uploaded message count
|
|
22
22
|
let sessionGraph = new Map(); // parent_id -> [child_ids]
|
|
23
23
|
let pendingChildSessions = new Map(); // child_id -> {parent_id, data}
|
|
24
|
+
let lastDeltaByPartField = new Map();
|
|
25
|
+
|
|
26
|
+
const STORE_PATH = path.join(os.homedir(), '.opencode', 'witty_plugin_session_store.json');
|
|
27
|
+
|
|
28
|
+
function cleanupOldSessions() {
|
|
29
|
+
const now = Date.now();
|
|
30
|
+
const threeDays = 3 * 24 * 3600 * 1000;
|
|
31
|
+
|
|
32
|
+
let deletedCount = 0;
|
|
33
|
+
for (const [msgId, entry] of sessionStore.entries()) {
|
|
34
|
+
const time = entry.info?.created || entry.info?.time?.created;
|
|
35
|
+
if (time && (now - time > threeDays)) {
|
|
36
|
+
sessionStore.delete(msgId);
|
|
37
|
+
deletedCount++;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
if (deletedCount > 0) logDebug(`Cleaned up ${deletedCount} old messages from sessionStore`);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function loadStore() {
|
|
44
|
+
try {
|
|
45
|
+
if (fs.existsSync(STORE_PATH)) {
|
|
46
|
+
const fileData = fs.readFileSync(STORE_PATH, 'utf8');
|
|
47
|
+
if (!fileData.trim()) return;
|
|
48
|
+
const data = JSON.parse(fileData);
|
|
49
|
+
|
|
50
|
+
// Merge sessionStore: disk entries fill in gaps, but don't overwrite in-memory entries
|
|
51
|
+
if (data.sessionStore) {
|
|
52
|
+
const diskStore = new Map(data.sessionStore);
|
|
53
|
+
for (const [msgId, entry] of diskStore.entries()) {
|
|
54
|
+
if (!sessionStore.has(msgId)) {
|
|
55
|
+
if (entry.parts && !Array.isArray(entry.parts) && typeof entry.parts === 'object' && !(entry.parts instanceof Map)) {
|
|
56
|
+
entry.parts = new Map(Object.entries(entry.parts));
|
|
57
|
+
} else if (Array.isArray(entry.parts)) {
|
|
58
|
+
entry.parts = new Map(entry.parts);
|
|
59
|
+
} else if (!entry.parts) {
|
|
60
|
+
entry.parts = new Map();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (entry.toolParts && !Array.isArray(entry.toolParts) && typeof entry.toolParts === 'object' && !(entry.toolParts instanceof Map)) {
|
|
64
|
+
entry.toolParts = new Map(Object.entries(entry.toolParts));
|
|
65
|
+
} else if (Array.isArray(entry.toolParts)) {
|
|
66
|
+
entry.toolParts = new Map(entry.toolParts);
|
|
67
|
+
} else if (!entry.toolParts) {
|
|
68
|
+
entry.toolParts = new Map();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
sessionStore.set(msgId, entry);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Merge uploadedSessions: keep the "newer" signature between memory and disk
|
|
77
|
+
if (data.uploadedSessions) {
|
|
78
|
+
for (const x of data.uploadedSessions) {
|
|
79
|
+
const sid = Array.isArray(x) ? x[0] : x;
|
|
80
|
+
const diskVal = Array.isArray(x) ? x[1] : 0;
|
|
81
|
+
|
|
82
|
+
const normalize = (v) => {
|
|
83
|
+
if (typeof v === 'number') return { count: v, lastAssistantLen: 0, lastTs: 0 };
|
|
84
|
+
if (v && typeof v === 'object') {
|
|
85
|
+
return {
|
|
86
|
+
count: Number(v.count || 0),
|
|
87
|
+
lastAssistantLen: Number(v.lastAssistantLen || 0),
|
|
88
|
+
lastTs: Number(v.lastTs || 0)
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
return { count: 0, lastAssistantLen: 0, lastTs: 0 };
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const memSig = normalize(uploadedSessions.get(sid));
|
|
95
|
+
const diskSig = normalize(diskVal);
|
|
96
|
+
|
|
97
|
+
const diskNewer =
|
|
98
|
+
diskSig.count > memSig.count ||
|
|
99
|
+
(diskSig.count === memSig.count && diskSig.lastAssistantLen > memSig.lastAssistantLen) ||
|
|
100
|
+
(diskSig.count === memSig.count && diskSig.lastAssistantLen === memSig.lastAssistantLen && diskSig.lastTs > memSig.lastTs);
|
|
101
|
+
|
|
102
|
+
if (diskNewer) {
|
|
103
|
+
uploadedSessions.set(sid, diskVal);
|
|
104
|
+
} else if (!uploadedSessions.has(sid)) {
|
|
105
|
+
uploadedSessions.set(sid, memSig);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Merge sessionGraph: union child lists
|
|
111
|
+
if (data.sessionGraph) {
|
|
112
|
+
const diskGraph = new Map(data.sessionGraph);
|
|
113
|
+
for (const [parentId, childIds] of diskGraph.entries()) {
|
|
114
|
+
if (!sessionGraph.has(parentId)) {
|
|
115
|
+
sessionGraph.set(parentId, childIds);
|
|
116
|
+
} else {
|
|
117
|
+
const existing = sessionGraph.get(parentId);
|
|
118
|
+
for (const cid of childIds) {
|
|
119
|
+
if (!existing.includes(cid)) existing.push(cid);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Merge pendingChildSessions
|
|
126
|
+
if (data.pendingChildSessions) {
|
|
127
|
+
const diskPending = new Map(data.pendingChildSessions);
|
|
128
|
+
for (const [childId, childData] of diskPending.entries()) {
|
|
129
|
+
if (!pendingChildSessions.has(childId)) {
|
|
130
|
+
pendingChildSessions.set(childId, childData);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
logDebug(`Loaded store (merged): ${sessionStore.size} messages`);
|
|
136
|
+
}
|
|
137
|
+
} catch(e) {
|
|
138
|
+
logDebug("Store read err: " + e.message);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function saveStore() {
|
|
143
|
+
try {
|
|
144
|
+
cleanupOldSessions();
|
|
145
|
+
|
|
146
|
+
// Merge with disk state to prevent concurrent process data loss.
|
|
147
|
+
// loadStore() uses merge semantics (won't overwrite in-memory entries).
|
|
148
|
+
loadStore();
|
|
149
|
+
|
|
150
|
+
const data = {
|
|
151
|
+
sessionStore: Array.from(sessionStore.entries()).map(([k, v]) => [k, {
|
|
152
|
+
...v,
|
|
153
|
+
parts: v.parts instanceof Map ? Array.from(v.parts.entries()) : (v.parts || []),
|
|
154
|
+
toolParts: v.toolParts instanceof Map ? Array.from(v.toolParts.entries()) : (v.toolParts || [])
|
|
155
|
+
}]),
|
|
156
|
+
uploadedSessions: Array.from(uploadedSessions.entries()),
|
|
157
|
+
sessionGraph: Array.from(sessionGraph.entries()),
|
|
158
|
+
pendingChildSessions: Array.from(pendingChildSessions.entries()),
|
|
159
|
+
timestamp: new Date().toISOString()
|
|
160
|
+
};
|
|
161
|
+
fs.writeFileSync(STORE_PATH, JSON.stringify(data, null, 2), 'utf8');
|
|
162
|
+
} catch(e) {
|
|
163
|
+
logDebug("Store sync err: " + e.message);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
24
166
|
|
|
25
167
|
function toMsTimestamp(v) {
|
|
26
168
|
if (v == null) return null;
|
|
@@ -120,11 +262,12 @@ function loadConfiguration() {
|
|
|
120
262
|
|
|
121
263
|
function collectSessionMessages(sessionId) {
|
|
122
264
|
const messages = [];
|
|
265
|
+
logDebug(`collectSessionMessages: scanning ${sessionStore.size} entries for session ${sessionId}`);
|
|
123
266
|
for (const [mid, entry] of sessionStore.entries()) {
|
|
124
267
|
if (entry.info.sessionID === sessionId) {
|
|
125
268
|
// Calculate latency for this message if possible from parts
|
|
126
269
|
let partBasedDuration = 0;
|
|
127
|
-
if (entry.parts.size > 0) {
|
|
270
|
+
if (entry.parts instanceof Map && entry.parts.size > 0) {
|
|
128
271
|
const parts = Array.from(entry.parts.values()).map(p => p.time?.start || 0).filter(t => t > 0).sort((a,b)=>a-b);
|
|
129
272
|
if (parts.length >= 1) {
|
|
130
273
|
const start = parts[0];
|
|
@@ -133,9 +276,13 @@ function collectSessionMessages(sessionId) {
|
|
|
133
276
|
}
|
|
134
277
|
}
|
|
135
278
|
|
|
279
|
+
const role = entry.info.role || 'unknown';
|
|
280
|
+
const content = entry.content || entry.info.content || "";
|
|
281
|
+
logDebug(`Found message in store: id=${mid}, role=${role}, content_len=${content.length}`);
|
|
282
|
+
|
|
136
283
|
messages.push({
|
|
137
|
-
role:
|
|
138
|
-
content:
|
|
284
|
+
role: role,
|
|
285
|
+
content: content,
|
|
139
286
|
tool_calls: entry.info.tool_calls || entry.info.toolCalls,
|
|
140
287
|
function_call: entry.info.function_call || entry.info.functionCall,
|
|
141
288
|
usage: entry.info.usage || entry.info.tokens,
|
|
@@ -147,6 +294,7 @@ function collectSessionMessages(sessionId) {
|
|
|
147
294
|
});
|
|
148
295
|
}
|
|
149
296
|
}
|
|
297
|
+
logDebug(`collectSessionMessages: collected ${messages.length} messages for ${sessionId}`);
|
|
150
298
|
return messages;
|
|
151
299
|
}
|
|
152
300
|
|
|
@@ -196,6 +344,7 @@ function collectSessionWithChildren(sessionId) {
|
|
|
196
344
|
}
|
|
197
345
|
|
|
198
346
|
export default async function WittySkillInsightPlugin(input) {
|
|
347
|
+
loadStore();
|
|
199
348
|
const { apiKey, host } = loadConfiguration();
|
|
200
349
|
if (!apiKey || !host) {
|
|
201
350
|
logDebug("Plugin disabled: Missing API Key or Host");
|
|
@@ -250,26 +399,10 @@ export default async function WittySkillInsightPlugin(input) {
|
|
|
250
399
|
|
|
251
400
|
// logDebug(`Event: ${event.type}`);
|
|
252
401
|
|
|
253
|
-
|
|
402
|
+
try {
|
|
254
403
|
// Attempt to find session ID in various places
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
// 0. Handle session.created events to establish parent-child relationships
|
|
258
|
-
if (event.type === 'session.created') {
|
|
259
|
-
const sessionInfo = event.properties?.info || event.payload?.info;
|
|
260
|
-
if (sessionInfo && sessionInfo.id && sessionInfo.parentID) {
|
|
261
|
-
const childId = sessionInfo.id;
|
|
262
|
-
const parentId = sessionInfo.parentID;
|
|
263
|
-
|
|
264
|
-
if (!sessionGraph.has(parentId)) {
|
|
265
|
-
sessionGraph.set(parentId, []);
|
|
266
|
-
}
|
|
267
|
-
if (!sessionGraph.get(parentId).includes(childId)) {
|
|
268
|
-
sessionGraph.get(parentId).push(childId);
|
|
269
|
-
logDebug(`Session created: ${childId} is child of ${parentId}`);
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|
|
404
|
+
let sessionId = event.session_id || event.properties?.sessionID || event.payload?.session_id;
|
|
405
|
+
let eagerFlush = false;
|
|
273
406
|
|
|
274
407
|
// 1. Accumulate Message Metadata
|
|
275
408
|
if (event.type === 'message.created' || event.type === 'message.updated') {
|
|
@@ -284,11 +417,16 @@ export default async function WittySkillInsightPlugin(input) {
|
|
|
284
417
|
});
|
|
285
418
|
}
|
|
286
419
|
const entry = sessionStore.get(msgId);
|
|
420
|
+
if (!sessionId) sessionId = info.sessionID || info.sessionId || entry.info?.sessionID;
|
|
287
421
|
if (sessionId) entry.info.sessionID = sessionId;
|
|
288
422
|
// Merge info
|
|
289
423
|
Object.assign(entry.info, info);
|
|
290
424
|
if (info.tool_calls || info.toolCalls) entry.info.tool_calls = info.tool_calls || info.toolCalls;
|
|
291
425
|
if (info.function_call || info.functionCall) entry.info.function_call = info.function_call || info.functionCall;
|
|
426
|
+
|
|
427
|
+
if (entry.info?.role === 'assistant' && (entry.info.finish || entry.info.time?.completed != null)) {
|
|
428
|
+
eagerFlush = true;
|
|
429
|
+
}
|
|
292
430
|
}
|
|
293
431
|
}
|
|
294
432
|
|
|
@@ -309,6 +447,9 @@ export default async function WittySkillInsightPlugin(input) {
|
|
|
309
447
|
});
|
|
310
448
|
}
|
|
311
449
|
const entry = sessionStore.get(msgId);
|
|
450
|
+
if (!sessionId) sessionId = entry.info?.sessionID || part.sessionID || part.session_id;
|
|
451
|
+
if (!(entry.parts instanceof Map)) entry.parts = new Map(Array.isArray(entry.parts) ? entry.parts : []);
|
|
452
|
+
if (entry.toolParts && !(entry.toolParts instanceof Map)) entry.toolParts = new Map(Array.isArray(entry.toolParts) ? entry.toolParts : []);
|
|
312
453
|
|
|
313
454
|
// Store part
|
|
314
455
|
const partId = part.id || `temp_${Date.now()}_${Math.random()}`;
|
|
@@ -414,22 +555,82 @@ export default async function WittySkillInsightPlugin(input) {
|
|
|
414
555
|
}
|
|
415
556
|
}
|
|
416
557
|
|
|
558
|
+
if (event.type === 'message.part.delta') {
|
|
559
|
+
const props = event.properties || event.payload || {};
|
|
560
|
+
const msgId = props.messageID || props.message_id;
|
|
561
|
+
const partId = props.partID || props.part_id;
|
|
562
|
+
const field = props.field;
|
|
563
|
+
const delta = props.delta;
|
|
564
|
+
|
|
565
|
+
if (msgId && partId && field && typeof delta === 'string') {
|
|
566
|
+
if (!sessionStore.has(msgId)) {
|
|
567
|
+
sessionStore.set(msgId, {
|
|
568
|
+
info: { sessionID: sessionId },
|
|
569
|
+
parts: new Map(),
|
|
570
|
+
toolParts: new Map(),
|
|
571
|
+
content: ''
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
const entry = sessionStore.get(msgId);
|
|
576
|
+
if (!sessionId) sessionId = entry.info?.sessionID;
|
|
577
|
+
if (!(entry.parts instanceof Map)) entry.parts = new Map(Array.isArray(entry.parts) ? entry.parts : []);
|
|
578
|
+
|
|
579
|
+
const dedupeKey = `${msgId}:${partId}:${field}`;
|
|
580
|
+
const lastDelta = lastDeltaByPartField.get(dedupeKey);
|
|
581
|
+
if (lastDelta !== delta) {
|
|
582
|
+
lastDeltaByPartField.set(dedupeKey, delta);
|
|
583
|
+
if (lastDeltaByPartField.size > 5000) {
|
|
584
|
+
for (const k of lastDeltaByPartField.keys()) {
|
|
585
|
+
lastDeltaByPartField.delete(k);
|
|
586
|
+
if (lastDeltaByPartField.size <= 4000) break;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
const existingPart = entry.parts.get(partId) || {
|
|
591
|
+
id: partId,
|
|
592
|
+
messageID: msgId,
|
|
593
|
+
sessionID: sessionId,
|
|
594
|
+
type: 'text'
|
|
595
|
+
};
|
|
596
|
+
const prev = typeof existingPart[field] === 'string' ? existingPart[field] : '';
|
|
597
|
+
existingPart[field] = prev + delta;
|
|
598
|
+
entry.parts.set(partId, existingPart);
|
|
599
|
+
|
|
600
|
+
let full = "";
|
|
601
|
+
const sortedParts = Array.from(entry.parts.values()).sort((a, b) => {
|
|
602
|
+
const ta = a.time?.start || (a.meta && a.meta.start) || 0;
|
|
603
|
+
const tb = b.time?.start || (b.meta && b.meta.start) || 0;
|
|
604
|
+
return ta - tb;
|
|
605
|
+
});
|
|
606
|
+
|
|
607
|
+
for (const p of sortedParts) {
|
|
608
|
+
if (p.text) full += p.text;
|
|
609
|
+
else if (p.content) full += p.content;
|
|
610
|
+
}
|
|
611
|
+
entry.content = full;
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
|
|
417
616
|
// 3. Upload on Session Idle
|
|
418
|
-
if (event.type === "session.idle") {
|
|
617
|
+
if (event.type === "session.idle" || eagerFlush) {
|
|
419
618
|
if (!sessionId || !sessionId.startsWith("ses")) return;
|
|
420
619
|
|
|
421
|
-
//
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
620
|
+
// Reload store from disk to pick up any data written by
|
|
621
|
+
// concurrent child processes (e.g. opencode run executed
|
|
622
|
+
// from within the opencode interactive interface).
|
|
623
|
+
loadStore();
|
|
624
|
+
|
|
625
|
+
// Only treat a session as "child" when it was detected via Task tool
|
|
626
|
+
// (i.e. registered in sessionGraph). Do NOT rely on event.parentID because
|
|
627
|
+
// nested `opencode run ...` can also set parentID and we want both sessions uploaded.
|
|
628
|
+
let foundParentId = null;
|
|
629
|
+
for (const [potentialParent, childIds] of sessionGraph.entries()) {
|
|
630
|
+
if (childIds.includes(sessionId)) {
|
|
631
|
+
foundParentId = potentialParent;
|
|
632
|
+
logDebug(`Found parent ${foundParentId} for for child ${sessionId} from sessionGraph`);
|
|
633
|
+
break;
|
|
433
634
|
}
|
|
434
635
|
}
|
|
435
636
|
|
|
@@ -495,6 +696,7 @@ export default async function WittySkillInsightPlugin(input) {
|
|
|
495
696
|
let totalOutputTokens = 0;
|
|
496
697
|
let totalCacheReadInputTokens = 0;
|
|
497
698
|
let totalCacheCreationInputTokens = 0;
|
|
699
|
+
let totalReasoningTokens = 0;
|
|
498
700
|
let llmCallCount = 0;
|
|
499
701
|
let toolCallCount = 0;
|
|
500
702
|
let toolCallErrorCount = 0;
|
|
@@ -524,11 +726,18 @@ export default async function WittySkillInsightPlugin(input) {
|
|
|
524
726
|
const cacheReadToks = Number(u.cache?.read || u.cache_read_input_tokens || 0);
|
|
525
727
|
const cacheCreateToks = Number(u.cache?.write || u.cache_creation_input_tokens || 0);
|
|
526
728
|
const inputToks = Number(u.input_tokens || u.input || 0); // base input only (excludes cache)
|
|
527
|
-
const
|
|
729
|
+
const rawOutputToks = Number(u.output_tokens || u.output || 0);
|
|
730
|
+
const reasoningToks = Number(u.reasoning || u.reasoning_tokens || u.completion_tokens_details?.reasoning_tokens || 0);
|
|
731
|
+
// OpenCode reports reasoning separately from output; DeepSeek API includes it in output.
|
|
732
|
+
// Normalize: output_tokens should always include reasoning tokens.
|
|
733
|
+
const outputToks = (u.reasoning !== undefined && reasoningToks > 0 && rawOutputToks < reasoningToks)
|
|
734
|
+
? rawOutputToks + reasoningToks
|
|
735
|
+
: rawOutputToks;
|
|
528
736
|
totalInputTokens += inputToks;
|
|
529
737
|
totalOutputTokens += outputToks;
|
|
530
738
|
totalCacheReadInputTokens += cacheReadToks;
|
|
531
739
|
totalCacheCreationInputTokens += cacheCreateToks;
|
|
740
|
+
totalReasoningTokens += reasoningToks;
|
|
532
741
|
const callTotal = inputToks + cacheReadToks + cacheCreateToks + outputToks;
|
|
533
742
|
if (callTotal > maxSingleCallTokens) maxSingleCallTokens = callTotal;
|
|
534
743
|
}
|
|
@@ -574,6 +783,7 @@ export default async function WittySkillInsightPlugin(input) {
|
|
|
574
783
|
cache_read_input_tokens: totalCacheReadInputTokens,
|
|
575
784
|
cache_creation_input_tokens: totalCacheCreationInputTokens,
|
|
576
785
|
max_single_call_tokens: maxSingleCallTokens,
|
|
786
|
+
reasoning_tokens: totalReasoningTokens,
|
|
577
787
|
final_result: lastAssistantContent,
|
|
578
788
|
interactions: messages.map(m => ({
|
|
579
789
|
role: m.role,
|
|
@@ -587,11 +797,38 @@ export default async function WittySkillInsightPlugin(input) {
|
|
|
587
797
|
timestamp: new Date().toISOString()
|
|
588
798
|
};
|
|
589
799
|
|
|
590
|
-
|
|
591
|
-
|
|
800
|
+
let lastTs = 0;
|
|
801
|
+
for (const m of messages) {
|
|
802
|
+
const t1 = toMsTimestamp(m.timestamp) || 0;
|
|
803
|
+
const t2 = toMsTimestamp(m.timeInfo?.completed) || 0;
|
|
804
|
+
const t3 = toMsTimestamp(m.timeInfo?.created) || 0;
|
|
805
|
+
lastTs = Math.max(lastTs, t1, t2, t3);
|
|
806
|
+
}
|
|
807
|
+
const lastAssistantLen = (lastAssistantContent || '').length;
|
|
808
|
+
|
|
809
|
+
const normalize = (v) => {
|
|
810
|
+
if (typeof v === 'number') return { count: v, lastAssistantLen: 0, lastTs: 0 };
|
|
811
|
+
if (v && typeof v === 'object') {
|
|
812
|
+
return {
|
|
813
|
+
count: Number(v.count || 0),
|
|
814
|
+
lastAssistantLen: Number(v.lastAssistantLen || 0),
|
|
815
|
+
lastTs: Number(v.lastTs || 0)
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
return { count: 0, lastAssistantLen: 0, lastTs: 0 };
|
|
819
|
+
};
|
|
820
|
+
|
|
821
|
+
const prevSig = normalize(uploadedSessions.get(sessionId));
|
|
822
|
+
const shouldSkip =
|
|
823
|
+
messages.length <= prevSig.count &&
|
|
824
|
+
lastAssistantLen <= prevSig.lastAssistantLen &&
|
|
825
|
+
lastTs <= prevSig.lastTs;
|
|
826
|
+
|
|
827
|
+
if (shouldSkip) {
|
|
828
|
+
logDebug(`Session ${sessionId} already uploaded (count=${prevSig.count}, lastAssistantLen=${prevSig.lastAssistantLen}, lastTs=${prevSig.lastTs}) (cur: count=${messages.length}, lastAssistantLen=${lastAssistantLen}, lastTs=${lastTs}), skipping.`);
|
|
592
829
|
return;
|
|
593
830
|
}
|
|
594
|
-
uploadedSessions.
|
|
831
|
+
uploadedSessions.set(sessionId, { count: messages.length, lastAssistantLen, lastTs });
|
|
595
832
|
|
|
596
833
|
const body = JSON.stringify(payload);
|
|
597
834
|
logDebug(`Payload Body Size: ${Buffer.byteLength(body)} bytes`);
|
|
@@ -691,6 +928,8 @@ try {
|
|
|
691
928
|
}
|
|
692
929
|
} catch (err) {
|
|
693
930
|
logDebug(`Plugin Exception: ${err.message}`);
|
|
931
|
+
} finally {
|
|
932
|
+
saveStore();
|
|
694
933
|
}
|
|
695
934
|
}
|
|
696
935
|
};
|