vibepulse 0.2.2 → 0.3.1-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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +1 -0
- package/.next/build-manifest.json +2 -2
- package/.next/cache/.previewinfo +1 -1
- package/.next/cache/.rscinfo +1 -1
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/fallback-build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +8 -0
- package/.next/server/app/_global-error/page.js +1 -1
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error.html +2 -2
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/node/events/route.js +2 -2
- package/.next/server/app/api/node/events/route.js.nft.json +1 -1
- package/.next/server/app/api/node/sessions/[id]/delete/route.js +2 -2
- package/.next/server/app/api/node/sessions/[id]/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/node/sessions/[id]/open-editor/route.js +2 -2
- package/.next/server/app/api/node/sessions/[id]/open-editor/route.js.nft.json +1 -1
- package/.next/server/app/api/node/sessions/route.js +6 -4
- package/.next/server/app/api/node/sessions/route.js.nft.json +1 -1
- package/.next/server/app/api/nodes/route.js +2 -2
- package/.next/server/app/api/nodes/route.js.nft.json +1 -1
- package/.next/server/app/api/opencode-config/route.js +2 -2
- package/.next/server/app/api/opencode-config/route.js.nft.json +1 -1
- package/.next/server/app/api/opencode-config/status/route.js +2 -2
- package/.next/server/app/api/opencode-config/status/route.js.nft.json +1 -1
- package/.next/server/app/api/opencode-events/route.js +3 -3
- package/.next/server/app/api/opencode-events/route.js.nft.json +1 -1
- package/.next/server/app/api/profiles/[id]/apply/route.js +2 -2
- package/.next/server/app/api/profiles/[id]/apply/route.js.nft.json +1 -1
- package/.next/server/app/api/profiles/[id]/export/route.js +2 -2
- package/.next/server/app/api/profiles/[id]/export/route.js.nft.json +1 -1
- package/.next/server/app/api/profiles/[id]/route.js +2 -2
- package/.next/server/app/api/profiles/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/profiles/import/route.js +2 -2
- package/.next/server/app/api/profiles/import/route.js.nft.json +1 -1
- package/.next/server/app/api/profiles/route.js +2 -2
- package/.next/server/app/api/profiles/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/archive/route.js +3 -2
- package/.next/server/app/api/sessions/[id]/archive/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/delete/route.js +4 -3
- package/.next/server/app/api/sessions/[id]/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/open-editor/route.js +2 -2
- package/.next/server/app/api/sessions/[id]/open-editor/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/restore/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/sessions/[id]/restore/route/build-manifest.json +11 -0
- package/.next/server/app/api/sessions/[id]/restore/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/sessions/[id]/restore/route.js +8 -0
- package/.next/server/app/api/sessions/[id]/restore/route.js.map +5 -0
- package/.next/server/app/api/sessions/[id]/restore/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/[id]/restore/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/sessions/[id]/route.js +2 -2
- package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/route.js +5 -3
- package/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +3 -3
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +1 -0
- package/.next/server/chunks/[root-of-the-server]__005eb0c5._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__005eb0c5._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__09e90d57._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__09e90d57._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__18dd0ce9._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__18dd0ce9._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__19468536._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__19468536._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1b87ec42._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1b87ec42._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__2b912935._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__2b912935._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__303d3bac._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__303d3bac._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__3fac2b91._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__3fac2b91._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__43440b8d._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__43440b8d._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__438f8bbe._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__438f8bbe._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__4a0bfb55._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__4a0bfb55._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__534c3949._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__534c3949._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__59160266._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__59160266._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__6f812da0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__6f812da0._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__71aac504._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__71aac504._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__907a8bf2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__907a8bf2._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__92089220._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__92089220._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__9b7bc2d0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__9b7bc2d0._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__b2640944._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__b2640944._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__c2267cf1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__c2267cf1._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__d7f7e6dd._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__6924c09d._.js.map → [root-of-the-server]__d7f7e6dd._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__d8e61048._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__d8e61048._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__f6d0d488._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__192ed2f4._.js.map → [root-of-the-server]__f6d0d488._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__fa559e1e._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__fa559e1e._.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_sessions_[id]_restore_route_actions_af7d6b6c.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_sessions_[id]_restore_route_actions_af7d6b6c.js.map +1 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_7e181e75.js +1 -1
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_7e181e75.js.map +1 -1
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_aca45402.js +1 -1
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_aca45402.js.map +1 -1
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_b054aff3.js +1 -1
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_b054aff3.js.map +1 -1
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_fa835ac3.js +2 -2
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_fa835ac3.js.map +1 -1
- package/.next/server/chunks/src_lib_opencodeConfig_ts_8e209941._.js +3 -0
- package/.next/server/chunks/src_lib_opencodeConfig_ts_8e209941._.js.map +1 -0
- package/.next/server/chunks/src_lib_session-providers_claudeCode_ts_0f9590ed._.js +3 -0
- package/.next/server/chunks/src_lib_session-providers_claudeCode_ts_0f9590ed._.js.map +1 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__631e12d0._.js → [root-of-the-server]__c91a8380._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__631e12d0._.js.map → [root-of-the-server]__c91a8380._.js.map} +1 -1
- package/.next/server/chunks/ssr/src_app_page_tsx_a7111f3e._.js +3 -3
- package/.next/server/chunks/ssr/src_app_page_tsx_a7111f3e._.js.map +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +2 -2
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +1 -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 +8 -0
- package/.next/standalone/.next/server/app/_global-error/page.js +1 -1
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- 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 +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 +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- 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 +2 -2
- 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/node/events/route.js +2 -2
- package/.next/standalone/.next/server/app/api/node/events/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/node/sessions/[id]/delete/route.js +2 -2
- package/.next/standalone/.next/server/app/api/node/sessions/[id]/delete/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/node/sessions/[id]/open-editor/route.js +2 -2
- package/.next/standalone/.next/server/app/api/node/sessions/[id]/open-editor/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/node/sessions/route.js +6 -4
- package/.next/standalone/.next/server/app/api/node/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/nodes/route.js +2 -2
- package/.next/standalone/.next/server/app/api/nodes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/opencode-config/route.js +2 -2
- package/.next/standalone/.next/server/app/api/opencode-config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/opencode-config/status/route.js +2 -2
- package/.next/standalone/.next/server/app/api/opencode-config/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/opencode-events/route.js +3 -3
- package/.next/standalone/.next/server/app/api/opencode-events/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/profiles/[id]/apply/route.js +2 -2
- package/.next/standalone/.next/server/app/api/profiles/[id]/apply/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/profiles/[id]/export/route.js +2 -2
- package/.next/standalone/.next/server/app/api/profiles/[id]/export/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/profiles/[id]/route.js +2 -2
- package/.next/standalone/.next/server/app/api/profiles/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/profiles/import/route.js +2 -2
- package/.next/standalone/.next/server/app/api/profiles/import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/profiles/route.js +2 -2
- package/.next/standalone/.next/server/app/api/profiles/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/archive/route.js +3 -2
- package/.next/standalone/.next/server/app/api/sessions/[id]/archive/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/delete/route.js +4 -3
- package/.next/standalone/.next/server/app/api/sessions/[id]/delete/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/open-editor/route.js +2 -2
- package/.next/standalone/.next/server/app/api/sessions/[id]/open-editor/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/restore/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/sessions/[id]/restore/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/sessions/[id]/restore/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/sessions/[id]/restore/route.js +8 -0
- package/.next/standalone/.next/server/app/api/sessions/[id]/restore/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/sessions/[id]/restore/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/sessions/[id]/restore/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/sessions/[id]/route.js +2 -2
- package/.next/standalone/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/route.js +5 -3
- package/.next/standalone/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +3 -3
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +1 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__005eb0c5._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__09e90d57._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__18dd0ce9._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__19468536._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1b87ec42._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2b912935._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__303d3bac._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__3fac2b91._.js +5 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__43440b8d._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__438f8bbe._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4a0bfb55._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__534c3949._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__59160266._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6f812da0._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__71aac504._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__907a8bf2._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__92089220._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__9b7bc2d0._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b2640944._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c2267cf1._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d7f7e6dd._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d8e61048._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f6d0d488._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__fa559e1e._.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_sessions_[id]_restore_route_actions_af7d6b6c.js +3 -0
- package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_7e181e75.js +1 -1
- package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_aca45402.js +1 -1
- package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_b054aff3.js +1 -1
- package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_fa835ac3.js +2 -2
- package/.next/standalone/.next/server/chunks/src_lib_opencodeConfig_ts_8e209941._.js +3 -0
- package/.next/standalone/.next/server/chunks/src_lib_session-providers_claudeCode_ts_0f9590ed._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__631e12d0._.js → [root-of-the-server]__c91a8380._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/src_app_page_tsx_a7111f3e._.js +3 -3
- 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/9e790b67c80f853c.js +13 -0
- package/.next/standalone/.next/static/chunks/c3dc8cd80979c971.css +3 -0
- package/.next/standalone/AGENTS.md +4 -0
- package/.next/standalone/README.md +54 -5
- package/.next/standalone/check-hsql.mjs +1 -1
- package/.next/standalone/docs/session-status-detection.md +36 -0
- package/.next/standalone/docs/superpowers/specs/2026-04-09-claude-capability-alignment-design.md +39 -0
- package/.next/standalone/eslint.config.mjs +1 -0
- package/.next/standalone/package-lock.json +74 -13
- package/.next/standalone/package.json +2 -2
- package/.next/standalone/src/app/api/node/events/route.ts +3 -3
- package/.next/standalone/src/app/api/node/sessions/[id]/archive/route.test.ts +60 -1
- package/.next/standalone/src/app/api/node/sessions/[id]/archive/route.ts +77 -22
- package/.next/standalone/src/app/api/node/sessions/[id]/delete/route.ts +6 -5
- package/.next/standalone/src/app/api/node/sessions/[id]/open-editor/route.ts +6 -5
- package/.next/standalone/src/app/api/node/sessions/route.test.ts +282 -0
- package/.next/standalone/src/app/api/node/sessions/route.ts +156 -30
- package/.next/standalone/src/app/api/opencode-config/route.test.ts +613 -0
- package/.next/standalone/src/app/api/opencode-config/route.ts +336 -185
- package/.next/standalone/src/app/api/opencode-events/route.test.ts +77 -1
- package/.next/standalone/src/app/api/opencode-events/route.ts +3 -3
- package/.next/standalone/src/app/api/opencode-models/route.test.ts +19 -0
- package/.next/standalone/src/app/api/opencode-models/route.ts +4 -1
- package/.next/standalone/src/app/api/profiles/[id]/apply/route.test.ts +227 -0
- package/.next/standalone/src/app/api/profiles/[id]/apply/route.ts +13 -9
- package/.next/standalone/src/app/api/sessions/[id]/archive/route.test.ts +126 -0
- package/.next/standalone/src/app/api/sessions/[id]/archive/route.ts +47 -12
- package/.next/standalone/src/app/api/sessions/[id]/delete/route.test.ts +140 -0
- package/.next/standalone/src/app/api/sessions/[id]/delete/route.ts +51 -16
- package/.next/standalone/src/app/api/sessions/[id]/open-editor/route.test.ts +74 -0
- package/.next/standalone/src/app/api/sessions/[id]/open-editor/route.ts +22 -2
- package/.next/standalone/src/app/api/sessions/[id]/restore/route.test.ts +186 -0
- package/.next/standalone/src/app/api/sessions/[id]/restore/route.ts +184 -0
- package/.next/standalone/src/app/api/sessions/[id]/route.ts +3 -3
- package/.next/standalone/src/app/api/sessions/route.test.ts +1955 -100
- package/.next/standalone/src/app/api/sessions/route.ts +361 -986
- package/.next/standalone/src/components/KanbanBoard.test.tsx +307 -1
- package/.next/standalone/src/components/KanbanBoard.tsx +106 -19
- package/.next/standalone/src/components/ProjectCard.test.tsx +420 -6
- package/.next/standalone/src/components/ProjectCard.tsx +238 -86
- package/.next/standalone/src/components/SessionCard.test.tsx +259 -8
- package/.next/standalone/src/components/SessionCard.tsx +182 -76
- package/.next/standalone/src/components/opencode-config/AgentConfigForm.test.tsx +141 -1
- package/.next/standalone/src/components/opencode-config/AgentConfigForm.tsx +99 -7
- package/.next/standalone/src/components/opencode-config/GeneralSettingsForm.test.tsx +11 -0
- package/.next/standalone/src/components/opencode-config/GeneralSettingsForm.tsx +41 -2
- package/.next/standalone/src/components/opencode-config/categories/CategoriesManager.tsx +3 -1
- package/.next/standalone/src/components/opencode-config/categories/CategoryConfigForm.test.tsx +106 -8
- package/.next/standalone/src/components/opencode-config/categories/CategoryConfigForm.tsx +82 -5
- package/.next/standalone/src/hooks/useHostSources.test.ts +0 -41
- package/.next/standalone/src/hooks/useOpencodeSync.test.ts +321 -1
- package/.next/standalone/src/hooks/useOpencodeSync.ts +16 -12
- package/.next/standalone/src/lib/claudeSessionOverrides.test.ts +75 -0
- package/.next/standalone/src/lib/claudeSessionOverrides.ts +169 -0
- package/.next/standalone/src/lib/fixtures/opencode-config/oh-my-openagent.v4.jsonc +70 -0
- package/.next/standalone/src/lib/fixtures/opencode-config/oh-my-openagent.v4.secret-like.jsonc +21 -0
- package/.next/standalone/src/lib/fixtures/opencode-config/oh-my-opencode.v3.jsonc +17 -0
- package/.next/standalone/src/lib/opencodeConfig.test.ts +430 -3
- package/.next/standalone/src/lib/opencodeConfig.ts +157 -4
- package/.next/standalone/src/lib/opencodeDiscovery.test.ts +241 -0
- package/.next/standalone/src/lib/opencodeDiscovery.ts +164 -9
- package/.next/standalone/src/lib/profiles/share.test.ts +92 -0
- package/.next/standalone/src/lib/profiles/share.ts +1 -0
- package/.next/standalone/src/lib/profiles/storage.test.ts +77 -1
- package/.next/standalone/src/lib/profiles/storage.ts +10 -9
- package/.next/standalone/src/lib/session-providers/claudeCode.test.ts +2288 -0
- package/.next/standalone/src/lib/session-providers/claudeCode.ts +1083 -0
- package/.next/standalone/src/lib/session-providers/localAggregator.test.ts +322 -0
- package/.next/standalone/src/lib/session-providers/localAggregator.ts +302 -0
- package/.next/standalone/src/lib/session-providers/opencodeProvider.test.ts +170 -0
- package/.next/standalone/src/lib/session-providers/opencodeProvider.ts +721 -0
- package/.next/standalone/src/lib/session-providers/opencodeSdkCompat.ts +92 -0
- package/.next/standalone/src/lib/session-providers/providerIds.test.ts +337 -0
- package/.next/standalone/src/lib/session-providers/providerIds.ts +176 -0
- package/.next/standalone/src/lib/session-providers/types.ts +131 -0
- package/.next/standalone/src/lib/transform.test.ts +253 -0
- package/.next/standalone/src/lib/transform.ts +96 -37
- package/.next/standalone/src/types/index.ts +23 -17
- package/.next/standalone/src/types/opencodeConfig.ts +55 -0
- package/.next/static/chunks/9e790b67c80f853c.js +13 -0
- package/.next/static/chunks/c3dc8cd80979c971.css +3 -0
- package/.next/trace +1 -1
- package/.next/trace-build +1 -1
- package/.next/types/routes.d.ts +2 -1
- package/.next/types/validator.ts +9 -0
- package/README.md +54 -5
- package/package.json +2 -2
- package/.next/server/chunks/[root-of-the-server]__1211da38._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1211da38._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__192ed2f4._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__2b526e7a._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__2b526e7a._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__2f981540._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__2f981540._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__3745b314._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__3745b314._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__56690af0._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__56690af0._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__56f5f249._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__56f5f249._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__59175de4._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__59175de4._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__64fffc02._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__64fffc02._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__6924c09d._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__6c428a24._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__6c428a24._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__73a00b88._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__73a00b88._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__7e757f50._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__7e757f50._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__89c5eeab._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__89c5eeab._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__8da6c5a8._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__8da6c5a8._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__b796d06c._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__b796d06c._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__c2ce5c0f._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__c2ce5c0f._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__db285678._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__db285678._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__e00a9200._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__e00a9200._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__e5df5e5f._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__e5df5e5f._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__edbc8d9e._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__edbc8d9e._.js.map +0 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1211da38._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__192ed2f4._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2b526e7a._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2f981540._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__3745b314._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__56690af0._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__56f5f249._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__59175de4._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__64fffc02._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6924c09d._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6c428a24._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__73a00b88._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__7e757f50._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__89c5eeab._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8da6c5a8._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b796d06c._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c2ce5c0f._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__db285678._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e00a9200._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e5df5e5f._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__edbc8d9e._.js +0 -3
- package/.next/standalone/.next/static/chunks/65d5354ba0add961.js +0 -13
- package/.next/standalone/.next/static/chunks/f42202943f6742e5.css +0 -3
- package/.next/static/chunks/65d5354ba0add961.js +0 -13
- package/.next/static/chunks/f42202943f6742e5.css +0 -3
- /package/.next/standalone/.next/static/{5kq9DtuBFVxu4jsgmL5Q- → 0WaQ6UjiNBgvh531pJVh0}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{5kq9DtuBFVxu4jsgmL5Q- → 0WaQ6UjiNBgvh531pJVh0}/_clientMiddlewareManifest.json +0 -0
- /package/.next/standalone/.next/static/{5kq9DtuBFVxu4jsgmL5Q- → 0WaQ6UjiNBgvh531pJVh0}/_ssgManifest.js +0 -0
- /package/.next/static/{5kq9DtuBFVxu4jsgmL5Q- → 0WaQ6UjiNBgvh531pJVh0}/_buildManifest.js +0 -0
- /package/.next/static/{5kq9DtuBFVxu4jsgmL5Q- → 0WaQ6UjiNBgvh531pJVh0}/_clientMiddlewareManifest.json +0 -0
- /package/.next/static/{5kq9DtuBFVxu4jsgmL5Q- → 0WaQ6UjiNBgvh531pJVh0}/_ssgManifest.js +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},57181,e=>{"use strict";var t=e.i(24868),r=e.i(22734),i=e.i(14747),n=e.i(46786),a=e.i(89196);let o=(0,i.join)((0,n.homedir)(),".config","opencode"),s=(0,i.join)(o,"oh-my-openagent.jsonc"),l=(0,i.join)(o,"oh-my-opencode.jsonc"),p="https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/v3.15.2/assets/oh-my-opencode.schema.json";function d(e){let t="object"!=typeof e||null===e||Array.isArray(e)?{}:{...e};return{...t,openEditorTargetMode:"hub"===t.openEditorTargetMode?"hub":"remote"}}function u(e=s){return e!==s?e:(0,r.existsSync)(s)?s:(0,r.existsSync)(l)?l:s}function c(e=s){try{return(0,r.existsSync)(u(e))}catch{return!1}}async function f(e=s){try{let r=await (0,t.readFile)(u(e),"utf-8");return(0,a.parse)(r,null,!1)}catch{return{}}}async function m(e,n=s){try{let o=(0,i.join)(n,"..");(0,r.existsSync)(o)||(0,r.mkdirSync)(o,{recursive:!0});let l=n===s?{...e,$schema:e.$schema||p}:e,d=(0,a.stringify)(l,null,2);await (0,t.writeFile)(n,d,"utf-8")}catch(e){throw Error(`Failed to write config: ${e}`)}}e.s(["OH_MY_OPENAGENT_CONFIG_SCHEMA",0,p,"detectConfig",()=>c,"normalizeVibePulseConfig",()=>d,"readConfig",()=>f,"resolveConfigPath",()=>u,"writeConfig",()=>m])},53977,e=>{"use strict";var t=e.i(24868),r=e.i(22734),i=e.i(14747),n=e.i(46786),a=e.i(89196),o=e.i(57181);let s=(0,i.join)((0,n.homedir)(),".config","opencode","profiles"),l=(0,i.join)(s,"index.json"),p=[{id:"balanced",name:"Balanced",emoji:"⚖️",description:"Balanced multi-model orchestration optimized for general coding tasks",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),isBuiltIn:!0}],d={balanced:{agents:{sisyphus:{model:"anthropic/claude-opus-4-6",variant:"max",temperature:.2,top_p:.9},oracle:{model:"openai/gpt-5.4",variant:"high",temperature:.2,top_p:.9},prometheus:{model:"anthropic/claude-opus-4-6",variant:"max",temperature:.2,top_p:.9},metis:{model:"anthropic/claude-opus-4-6",variant:"max",temperature:.2,top_p:.9},momus:{model:"openai/gpt-5.4",variant:"medium",temperature:.2,top_p:.9},atlas:{model:"anthropic/claude-sonnet-4-6",temperature:.2,top_p:.9},hephaestus:{model:"openai/gpt-5.4",variant:"medium",temperature:.2,top_p:.9},librarian:{model:"minimax-m2.7",temperature:.3,top_p:.9},explore:{model:"grok-code-fast-1",temperature:.1,top_p:.9},"multimodal-looker":{model:"openai/gpt-5.4",variant:"medium",temperature:.2,top_p:.9},"frontend-ui-ux":{model:"google/gemini-3.1-pro",variant:"high",temperature:.3,top_p:.9}},categories:{"visual-engineering":{model:"google/gemini-3.1-pro",variant:"high"},ultrabrain:{model:"openai/gpt-5.4",variant:"xhigh"},deep:{model:"openai/gpt-5.4",variant:"medium"},artistry:{model:"google/gemini-3.1-pro",variant:"high"},quick:{model:"openai/gpt-5.4-mini",temperature:.1},"unspecified-low":{model:"anthropic/claude-sonnet-4-6",temperature:.2},"unspecified-high":{model:"anthropic/claude-opus-4-6",variant:"max",temperature:.2},writing:{model:"google/gemini-3-flash",temperature:.3}}}};function u(){(0,r.existsSync)(s)||(0,r.mkdirSync)(s,{recursive:!0})}function c(e){return(0,i.join)(s,`${e}.json`)}function f(e){if(!e||"object"!=typeof e)return{$schema:o.OH_MY_OPENAGENT_CONFIG_SCHEMA,agents:{}};let t=e.agents&&"object"==typeof e.agents?e.agents:{},r=e.categories&&"object"==typeof e.categories?e.categories:void 0;return{$schema:"string"==typeof e.$schema&&e.$schema.trim().length>0?e.$schema:o.OH_MY_OPENAGENT_CONFIG_SCHEMA,agents:t,categories:r}}function m(){return{version:1,profiles:[...p],activeProfileId:null,lastModified:new Date().toISOString()}}async function g(){let e=new Set(p.map(e=>e.id));for(let i of["coding","writing","debug","minimal"])if(!e.has(i)){let e=c(i);(0,r.existsSync)(e)&&await (0,t.unlink)(e)}for(let e of p){let t=d[e.id]||{agents:{}};await E(e.id,t)}}async function h(){return y(!0)}async function x(){return y(!1)}async function y(e){try{if(u(),!(0,r.existsSync)(l)){let e=m();return await w(e),await g(),e}let e=await (0,t.readFile)(l,"utf-8"),i=(0,a.parse)(e,null,!1),n=!1;for(let e of p)i.profiles.some(t=>t.id===e.id)||(i.profiles.push(e),n=!0);let o=new Set(p.map(e=>e.id)),s=i.profiles.length;return i.profiles=i.profiles.filter(e=>!e.isBuiltIn||o.has(e.id)),i.profiles.length!==s&&(n=!0),await g(),n&&(i.lastModified=new Date().toISOString(),await w(i)),i}catch(t){if(!e)throw t;return m()}}async function w(e){u(),e.lastModified=new Date().toISOString();let r=(0,a.stringify)(e,null,2);await (0,t.writeFile)(l,r,"utf-8")}async function v(e){try{let i=c(e);if(!(0,r.existsSync)(i))return{$schema:o.OH_MY_OPENAGENT_CONFIG_SCHEMA,agents:{}};let n=await (0,t.readFile)(i,"utf-8"),s=(0,a.parse)(n,null,!1),l=f(s);if(!s||"object"!=typeof s||"string"!=typeof s.$schema)try{await E(e,l)}catch{}return l}catch{return{$schema:o.OH_MY_OPENAGENT_CONFIG_SCHEMA,agents:{}}}}async function E(e,r){u();let i=c(e),n=(0,a.stringify)(f(r),null,2);await (0,t.writeFile)(i,n,"utf-8")}async function R(e){let i=(await h()).profiles.find(t=>t.id===e);if(i?.isBuiltIn){let t=d[e]||{agents:{}};return await E(e,t),!0}let n=c(e);return!!(0,r.existsSync)(n)&&(await (0,t.unlink)(n),!0)}async function C(e){return(await h()).profiles.find(t=>t.id===e)}async function S(e){let t=await h();t.activeProfileId=e,await w(t)}e.s(["deleteProfileConfig",()=>R,"getProfileById",()=>C,"readProfileConfig",()=>v,"readProfileIndex",()=>h,"readProfileIndexStrict",()=>x,"setActiveProfileId",()=>S,"writeProfileConfig",()=>E,"writeProfileIndex",()=>w])},11451,e=>{"use strict";function t(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function r(e){return t(e)?{agents:t(e.agents)?e.agents:{},categories:t(e.categories)?e.categories:void 0}:{agents:{}}}function i(e,t){return{version:1,source:"vibepulse",exportedAt:new Date().toISOString(),profile:{id:e.id,name:e.name,emoji:e.emoji,description:e.description},config:r(t)}}function n(e){if(!t(e))throw Error("Imported profile file must be a JSON object");let i=e.profile;if(!t(i))throw Error("Imported profile file is missing a valid profile block");let n=i.id;if("string"!=typeof n||""===n.trim())throw Error("Imported profile id is required");if(!/^[a-zA-Z0-9_-]+$/.test(n.trim()))throw Error("Imported profile id must contain only letters, numbers, hyphens, and underscores");let a=i.name;if("string"!=typeof a||""===a.trim())throw Error("Imported profile name is required");let o=i.emoji,s=i.description;return{profile:{id:n.trim(),name:a.trim(),emoji:"string"==typeof o&&o.trim()?o:"⚙️",description:"string"==typeof s&&s.trim()?s.trim():void 0},config:r(e.config)}}e.s(["createExportedProfileFile",()=>i,"parseImportedProfileFile",()=>n])},96085,e=>{"use strict";var t=e.i(47909),r=e.i(74017),i=e.i(96250),n=e.i(59756),a=e.i(61916),o=e.i(74677),s=e.i(69741),l=e.i(16795),p=e.i(87718),d=e.i(95169),u=e.i(47587),c=e.i(66012),f=e.i(70101),m=e.i(26937),g=e.i(10372),h=e.i(93695);e.i(52474);var x=e.i(220),y=e.i(89171),w=e.i(53977),v=e.i(11451);async function E(e,{params:t}){try{let{id:e}=await t,r=await (0,w.getProfileById)(e);if(!r)return y.NextResponse.json({error:"Profile not found"},{status:404});let i=await (0,w.readProfileConfig)(e),n=(0,v.createExportedProfileFile)(r,i),a=`${r.id}.vibepulse-profile.json`;return new y.NextResponse(JSON.stringify(n,null,2),{headers:{"Content-Type":"application/json; charset=utf-8","Content-Disposition":`attachment; filename="${a}"`}})}catch{return y.NextResponse.json({error:"Internal server error"},{status:500})}}e.s(["GET",()=>E],50750);var R=e.i(50750);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/profiles/[id]/export/route",pathname:"/api/profiles/[id]/export",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/profiles/[id]/export/route.ts",nextConfigOutput:"standalone",userland:R}),{workAsyncStorage:S,workUnitAsyncStorage:_,serverHooks:b}=C;function A(){return(0,i.patchFetch)({workAsyncStorage:S,workUnitAsyncStorage:_})}async function P(e,t,i){C.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let y="/api/profiles/[id]/export/route";y=y.replace(/\/index$/,"")||"/";let w=await C.prepare(e,t,{srcPage:y,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==i.waitUntil||i.waitUntil.call(i,Promise.resolve()),null;let{buildId:v,params:E,nextConfig:R,parsedUrl:S,isDraftMode:_,prerenderManifest:b,routerServerContext:A,isOnDemandRevalidate:P,revalidateOnlyGenerated:j,resolvedPathname:I,clientReferenceManifest:O,serverActionsManifest:N}=w,T=(0,s.normalizeAppPath)(y),k=!!(b.dynamicRoutes[T]||b.routes[I]),H=async()=>((null==A?void 0:A.render404)?await A.render404(e,t,S,!1):t.end("This page could not be found"),null);if(k&&!_){let e=!!b.routes[I],t=b.dynamicRoutes[T];if(t&&!1===t.fallback&&!e){if(R.experimental.adapterPath)return await H();throw new h.NoFallbackError}}let M=null;!k||C.isDev||_||(M="/index"===(M=I)?"/":M);let q=!0===C.isDev||!k,$=k&&!q;N&&O&&(0,o.setManifestsSingleton)({page:y,clientReferenceManifest:O,serverActionsManifest:N});let F=e.method||"GET",D=(0,a.getTracer)(),U=D.getActiveScopeSpan(),G={params:E,prerenderManifest:b,renderOpts:{experimental:{authInterrupts:!!R.experimental.authInterrupts},cacheComponents:!!R.cacheComponents,supportsDynamicResponse:q,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:R.cacheLife,waitUntil:i.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,i,n)=>C.onRequestError(e,t,i,n,A)},sharedContext:{buildId:v}},B=new l.NodeNextRequest(e),K=new l.NodeNextResponse(t),L=p.NextRequestAdapter.fromNodeNextRequest(B,(0,p.signalFromNodeResponse)(t));try{let o=async e=>C.handle(L,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=D.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let i=r.get("next.route");if(i){let t=`${F} ${i}`;e.setAttributes({"next.route":i,"http.route":i,"next.span_name":t}),e.updateName(t)}else e.updateName(`${F} ${y}`)}),s=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var a,l;let p=async({previousCacheEntry:r})=>{try{if(!s&&P&&j&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await o(n);e.fetchMetrics=G.renderOpts.fetchMetrics;let l=G.renderOpts.pendingWaitUntil;l&&i.waitUntil&&(i.waitUntil(l),l=void 0);let p=G.renderOpts.collectedTags;if(!k)return await (0,c.sendResponse)(B,K,a,G.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(a.headers);p&&(t[g.NEXT_CACHE_TAGS_HEADER]=p),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,i=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:i}}}}catch(t){throw(null==r?void 0:r.isStale)&&await C.onRequestError(e,t,{routerKind:"App Router",routePath:y,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:P})},!1,A),t}},d=await C.handleResponse({req:e,nextConfig:R,cacheKey:M,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:b,isRoutePPREnabled:!1,isOnDemandRevalidate:P,revalidateOnlyGenerated:j,responseGenerator:p,waitUntil:i.waitUntil,isMinimalMode:s});if(!k)return null;if((null==d||null==(a=d.value)?void 0:a.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(l=d.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",P?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),_&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let h=(0,f.fromNodeOutgoingHttpHeaders)(d.value.headers);return s&&k||h.delete(g.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||h.get("Cache-Control")||h.set("Cache-Control",(0,m.getCacheControlHeader)(d.cacheControl)),await (0,c.sendResponse)(B,K,new Response(d.value.body,{headers:h,status:d.value.status||200})),null};U?await l(U):await D.withPropagatedContext(e.headers,()=>D.trace(d.BaseServerSpan.handleRequest,{spanName:`${F} ${y}`,kind:a.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},l))}catch(t){if(t instanceof h.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:T,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:P})},!1,A),k)throw t;return await (0,c.sendResponse)(B,K,new Response(null,{status:500})),null}}e.s(["handler",()=>P,"patchFetch",()=>A,"routeModule",()=>C,"serverHooks",()=>b,"workAsyncStorage",()=>S,"workUnitAsyncStorage",()=>_],96085)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__89c5eeab._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/opencodeConfig.ts","../../../src/lib/profiles/storage.ts","../../../src/lib/profiles/share.ts","../../../src/app/api/profiles/%5Bid%5D/export/route.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["import { readFile, writeFile } from 'fs/promises';\nimport { existsSync, mkdirSync } from 'fs';\nimport { join } from 'path';\nimport { homedir } from 'os';\nimport { parse, stringify } from 'comment-json';\nimport type { OhMyOpenAgentConfig, OpenEditorTargetMode, VibePulseConfig } from '@/types/opencodeConfig';\n\nexport const CONFIG_DIR = join(homedir(), '.config', 'opencode');\nexport const CONFIG_PATH = join(CONFIG_DIR, 'oh-my-openagent.jsonc');\nexport const LEGACY_CONFIG_PATH = join(CONFIG_DIR, 'oh-my-opencode.jsonc');\nexport const OH_MY_OPENAGENT_CONFIG_SCHEMA = 'https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/v3.15.2/assets/oh-my-opencode.schema.json';\nexport const DEFAULT_OPEN_EDITOR_TARGET_MODE: OpenEditorTargetMode = 'remote';\n\nexport type OpenCodeConfig = OhMyOpenAgentConfig;\n\nexport function normalizeOpenEditorTargetMode(value: unknown): OpenEditorTargetMode {\n return value === 'hub' ? 'hub' : DEFAULT_OPEN_EDITOR_TARGET_MODE;\n}\n\nexport function normalizeVibePulseConfig(value: unknown): VibePulseConfig {\n const vibepulse = typeof value === 'object' && value !== null && !Array.isArray(value)\n ? { ...(value as Record<string, unknown>) }\n : {};\n\n return {\n ...vibepulse,\n openEditorTargetMode: normalizeOpenEditorTargetMode(vibepulse.openEditorTargetMode),\n };\n}\n\nexport function resolveConfigPath(configPath: string = CONFIG_PATH): string {\n if (configPath !== CONFIG_PATH) {\n return configPath;\n }\n\n if (existsSync(CONFIG_PATH)) {\n return CONFIG_PATH;\n }\n\n if (existsSync(LEGACY_CONFIG_PATH)) {\n return LEGACY_CONFIG_PATH;\n }\n\n return CONFIG_PATH;\n}\n\nexport function detectConfig(configPath: string = CONFIG_PATH): boolean {\n try {\n return existsSync(resolveConfigPath(configPath));\n } catch {\n return false;\n }\n}\n\nexport async function readConfig(configPath: string = CONFIG_PATH): Promise<OpenCodeConfig> {\n try {\n const content = await readFile(resolveConfigPath(configPath), 'utf-8');\n const config = parse(content, null, false) as OpenCodeConfig;\n return config;\n } catch {\n return {};\n }\n}\n\nexport async function writeConfig(\n config: OpenCodeConfig, \n configPath: string = CONFIG_PATH\n): Promise<void> {\n try {\n const configDir = join(configPath, '..');\n if (!existsSync(configDir)) {\n mkdirSync(configDir, { recursive: true });\n }\n\n const shouldEnforceSchema = configPath === CONFIG_PATH;\n const configWithSchema: OpenCodeConfig = shouldEnforceSchema\n ? {\n ...config,\n $schema: config.$schema || OH_MY_OPENAGENT_CONFIG_SCHEMA,\n }\n : config;\n\n const content = stringify(configWithSchema, null, 2);\n await writeFile(configPath, content, 'utf-8');\n } catch (error) {\n throw new Error(`Failed to write config: ${error}`);\n }\n}\n","import { readFile, writeFile, unlink } from 'fs/promises';\nimport { existsSync, mkdirSync } from 'fs';\nimport { join } from 'path';\nimport { homedir } from 'os';\nimport { parse, stringify } from 'comment-json';\nimport { OH_MY_OPENAGENT_CONFIG_SCHEMA } from '../opencodeConfig';\nimport type { AgentConfig, CategoryConfig } from '@/types/opencodeConfig';\n\nexport const PROFILES_DIR = join(homedir(), '.config', 'opencode', 'profiles');\nexport const PROFILE_INDEX_PATH = join(PROFILES_DIR, 'index.json');\n\nexport interface Profile {\n id: string;\n name: string;\n emoji: string;\n description?: string;\n createdAt: string;\n updatedAt: string;\n isDefault?: boolean;\n isBuiltIn?: boolean;\n}\n\nexport interface ProfileIndex {\n version: number;\n profiles: Profile[];\n activeProfileId: string | null;\n lastModified: string;\n}\n\nexport interface ProfileConfig {\n $schema?: string;\n agents: Record<string, AgentConfig>;\n categories?: Record<string, CategoryConfig>;\n}\n\nconst BUILTIN_PROFILES: Profile[] = [\n {\n id: 'balanced',\n name: 'Balanced',\n emoji: '⚖️',\n description: 'Balanced multi-model orchestration optimized for general coding tasks',\n createdAt: new Date().toISOString(),\n updatedAt: new Date().toISOString(),\n isBuiltIn: true,\n },\n];\n\nconst BUILTIN_PROFILE_CONFIGS: Record<string, ProfileConfig> = {\n balanced: {\n agents: {\n sisyphus: {\n model: 'anthropic/claude-opus-4-6',\n variant: 'max',\n temperature: 0.2,\n top_p: 0.9,\n },\n oracle: {\n model: 'openai/gpt-5.4',\n variant: 'high',\n temperature: 0.2,\n top_p: 0.9,\n },\n prometheus: {\n model: 'anthropic/claude-opus-4-6',\n variant: 'max',\n temperature: 0.2,\n top_p: 0.9,\n },\n metis: {\n model: 'anthropic/claude-opus-4-6',\n variant: 'max',\n temperature: 0.2,\n top_p: 0.9,\n },\n momus: {\n model: 'openai/gpt-5.4',\n variant: 'medium',\n temperature: 0.2,\n top_p: 0.9,\n },\n atlas: {\n model: 'anthropic/claude-sonnet-4-6',\n temperature: 0.2,\n top_p: 0.9,\n },\n hephaestus: {\n model: 'openai/gpt-5.4',\n variant: 'medium',\n temperature: 0.2,\n top_p: 0.9,\n },\n librarian: {\n model: 'minimax-m2.7',\n temperature: 0.3,\n top_p: 0.9,\n },\n explore: {\n model: 'grok-code-fast-1',\n temperature: 0.1,\n top_p: 0.9,\n },\n 'multimodal-looker': {\n model: 'openai/gpt-5.4',\n variant: 'medium',\n temperature: 0.2,\n top_p: 0.9,\n },\n 'frontend-ui-ux': {\n model: 'google/gemini-3.1-pro',\n variant: 'high',\n temperature: 0.3,\n top_p: 0.9,\n },\n },\n categories: {\n 'visual-engineering': {\n model: 'google/gemini-3.1-pro',\n variant: 'high',\n },\n ultrabrain: {\n model: 'openai/gpt-5.4',\n variant: 'xhigh',\n },\n deep: {\n model: 'openai/gpt-5.4',\n variant: 'medium',\n },\n artistry: {\n model: 'google/gemini-3.1-pro',\n variant: 'high',\n },\n quick: {\n model: 'openai/gpt-5.4-mini',\n temperature: 0.1,\n },\n 'unspecified-low': {\n model: 'anthropic/claude-sonnet-4-6',\n temperature: 0.2,\n },\n 'unspecified-high': {\n model: 'anthropic/claude-opus-4-6',\n variant: 'max',\n temperature: 0.2,\n },\n writing: {\n model: 'google/gemini-3-flash',\n temperature: 0.3,\n },\n },\n },\n};\n\nexport function ensureProfilesDir(): void {\n if (!existsSync(PROFILES_DIR)) {\n mkdirSync(PROFILES_DIR, { recursive: true });\n }\n}\n\nfunction getProfileConfigPath(id: string): string {\n return join(PROFILES_DIR, `${id}.json`);\n}\n\nfunction normalizeProfileConfig(config: unknown): ProfileConfig {\n if (!config || typeof config !== 'object') {\n return {\n $schema: OH_MY_OPENAGENT_CONFIG_SCHEMA,\n agents: {},\n };\n }\n\n const candidate = config as Record<string, unknown>;\n const agents =\n candidate.agents && typeof candidate.agents === 'object'\n ? (candidate.agents as Record<string, AgentConfig>)\n : {};\n\n const categories =\n candidate.categories && typeof candidate.categories === 'object'\n ? (candidate.categories as Record<string, CategoryConfig>)\n : undefined;\n\n const schema =\n typeof candidate.$schema === 'string' && candidate.$schema.trim().length > 0\n ? candidate.$schema\n : OH_MY_OPENAGENT_CONFIG_SCHEMA;\n\n return {\n $schema: schema,\n agents,\n categories,\n };\n}\n\nfunction createDefaultProfileIndex(): ProfileIndex {\n return {\n version: 1,\n profiles: [...BUILTIN_PROFILES],\n activeProfileId: null,\n lastModified: new Date().toISOString(),\n };\n}\n\nasync function createBuiltinProfileConfigs(): Promise<void> {\n const validBuiltinIds = new Set(BUILTIN_PROFILES.map(p => p.id));\n const deprecatedBuiltinIds = ['coding', 'writing', 'debug', 'minimal'];\n\n for (const deprecatedId of deprecatedBuiltinIds) {\n if (!validBuiltinIds.has(deprecatedId)) {\n const deprecatedConfigPath = getProfileConfigPath(deprecatedId);\n if (existsSync(deprecatedConfigPath)) {\n await unlink(deprecatedConfigPath);\n }\n }\n }\n\n for (const profile of BUILTIN_PROFILES) {\n const config = BUILTIN_PROFILE_CONFIGS[profile.id] || { agents: {} };\n await writeProfileConfig(profile.id, config);\n }\n}\n\nexport async function readProfileIndex(): Promise<ProfileIndex> {\n return readProfileIndexInternal(true);\n}\n\nexport async function readProfileIndexStrict(): Promise<ProfileIndex> {\n return readProfileIndexInternal(false);\n}\n\nasync function readProfileIndexInternal(fallbackOnError: boolean): Promise<ProfileIndex> {\n try {\n ensureProfilesDir();\n\n if (!existsSync(PROFILE_INDEX_PATH)) {\n const defaultIndex = createDefaultProfileIndex();\n await writeProfileIndex(defaultIndex);\n await createBuiltinProfileConfigs();\n return defaultIndex;\n }\n\n const content = await readFile(PROFILE_INDEX_PATH, 'utf-8');\n const index = parse(content, null, false) as unknown as ProfileIndex;\n \n // Ensure all built-in profiles exist in the index\n let modified = false;\n for (const builtinProfile of BUILTIN_PROFILES) {\n const exists = index.profiles.some(p => p.id === builtinProfile.id);\n if (!exists) {\n index.profiles.push(builtinProfile);\n modified = true;\n }\n }\n \n // Remove built-in profiles that are no longer in BUILTIN_PROFILES\n const builtinIds = new Set(BUILTIN_PROFILES.map(p => p.id));\n const oldLength = index.profiles.length;\n index.profiles = index.profiles.filter(p => !p.isBuiltIn || builtinIds.has(p.id));\n if (index.profiles.length !== oldLength) {\n modified = true;\n }\n \n await createBuiltinProfileConfigs();\n \n if (modified) {\n index.lastModified = new Date().toISOString();\n await writeProfileIndex(index);\n }\n \n return index;\n } catch (error) {\n if (!fallbackOnError) {\n throw error;\n }\n return createDefaultProfileIndex();\n }\n}\n\nexport async function writeProfileIndex(index: ProfileIndex): Promise<void> {\n ensureProfilesDir();\n \n index.lastModified = new Date().toISOString();\n const content = stringify(index, null, 2);\n \n await writeFile(PROFILE_INDEX_PATH, content, 'utf-8');\n}\n\n\nexport async function readProfileConfig(id: string): Promise<ProfileConfig> {\n try {\n const configPath = getProfileConfigPath(id);\n \n if (!existsSync(configPath)) {\n return {\n $schema: OH_MY_OPENAGENT_CONFIG_SCHEMA,\n agents: {},\n };\n }\n\n const content = await readFile(configPath, 'utf-8');\n const parsedConfig = parse(content, null, false) as unknown;\n const normalizedConfig = normalizeProfileConfig(parsedConfig);\n\n if (\n !parsedConfig ||\n typeof parsedConfig !== 'object' ||\n typeof (parsedConfig as { $schema?: unknown }).$schema !== 'string'\n ) {\n try {\n await writeProfileConfig(id, normalizedConfig);\n } catch {\n return normalizedConfig;\n }\n }\n\n return normalizedConfig;\n } catch {\n return {\n $schema: OH_MY_OPENAGENT_CONFIG_SCHEMA,\n agents: {},\n };\n }\n}\n\nexport async function writeProfileConfig(\n id: string, \n config: ProfileConfig\n): Promise<void> {\n ensureProfilesDir();\n\n const configPath = getProfileConfigPath(id);\n const content = stringify(normalizeProfileConfig(config), null, 2);\n\n await writeFile(configPath, content, 'utf-8');\n}\n\nexport async function deleteProfileConfig(id: string): Promise<boolean> {\n const index = await readProfileIndex();\n const profile = index.profiles.find(p => p.id === id);\n \n if (profile?.isBuiltIn) {\n const defaultConfig = BUILTIN_PROFILE_CONFIGS[id] || { agents: {} };\n await writeProfileConfig(id, defaultConfig);\n return true;\n }\n \n const configPath = getProfileConfigPath(id);\n \n if (!existsSync(configPath)) {\n return false;\n }\n \n await unlink(configPath);\n return true;\n}\n\nexport async function getProfileById(id: string): Promise<Profile | undefined> {\n const index = await readProfileIndex();\n return index.profiles.find(p => p.id === id);\n}\n\nexport async function getActiveProfileId(): Promise<string | null> {\n const index = await readProfileIndex();\n return index.activeProfileId;\n}\n\nexport async function setActiveProfileId(id: string | null): Promise<void> {\n const index = await readProfileIndex();\n index.activeProfileId = id;\n await writeProfileIndex(index);\n}\n","import type { Profile, ProfileConfig } from '@/types/opencodeConfig';\n\nexport interface ExportedProfileFile {\n version: 1;\n source: 'vibepulse';\n exportedAt: string;\n profile: {\n id: string;\n name: string;\n emoji: string;\n description?: string;\n };\n config: ProfileConfig;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction normalizeConfig(value: unknown): ProfileConfig {\n if (!isRecord(value)) {\n return { agents: {} };\n }\n\n return {\n agents: isRecord(value.agents) ? (value.agents as ProfileConfig['agents']) : {},\n categories: isRecord(value.categories)\n ? (value.categories as NonNullable<ProfileConfig['categories']>)\n : undefined,\n };\n}\n\nexport function createExportedProfileFile(\n profile: Profile,\n config: ProfileConfig\n): ExportedProfileFile {\n return {\n version: 1,\n source: 'vibepulse',\n exportedAt: new Date().toISOString(),\n profile: {\n id: profile.id,\n name: profile.name,\n emoji: profile.emoji,\n description: profile.description,\n },\n config: normalizeConfig(config),\n };\n}\n\nexport function parseImportedProfileFile(value: unknown): {\n profile: ExportedProfileFile['profile'];\n config: ProfileConfig;\n} {\n if (!isRecord(value)) {\n throw new Error('Imported profile file must be a JSON object');\n }\n\n const profileValue = value.profile;\n if (!isRecord(profileValue)) {\n throw new Error('Imported profile file is missing a valid profile block');\n }\n\n const id = profileValue.id;\n if (typeof id !== 'string' || id.trim() === '') {\n throw new Error('Imported profile id is required');\n }\n\n if (!/^[a-zA-Z0-9_-]+$/.test(id.trim())) {\n throw new Error('Imported profile id must contain only letters, numbers, hyphens, and underscores');\n }\n\n const name = profileValue.name;\n if (typeof name !== 'string' || name.trim() === '') {\n throw new Error('Imported profile name is required');\n }\n\n const emojiValue = profileValue.emoji;\n const descriptionValue = profileValue.description;\n\n return {\n profile: {\n id: id.trim(),\n name: name.trim(),\n emoji: typeof emojiValue === 'string' && emojiValue.trim() ? emojiValue : '⚙️',\n description:\n typeof descriptionValue === 'string' && descriptionValue.trim()\n ? descriptionValue.trim()\n : undefined,\n },\n config: normalizeConfig(value.config),\n };\n}\n","import { NextResponse } from 'next/server';\nimport { getProfileById, readProfileConfig } from '@/lib/profiles/storage';\nimport { createExportedProfileFile } from '@/lib/profiles/share';\n\ninterface RouteParams {\n params: Promise<{ id: string }>;\n}\n\nexport async function GET(_request: Request, { params }: RouteParams) {\n try {\n const { id } = await params;\n const profile = await getProfileById(id);\n\n if (!profile) {\n return NextResponse.json({ error: 'Profile not found' }, { status: 404 });\n }\n\n const config = await readProfileConfig(id);\n const payload = createExportedProfileFile(profile, config);\n const filename = `${profile.id}.vibepulse-profile.json`;\n\n return new NextResponse(JSON.stringify(payload, null, 2), {\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n 'Content-Disposition': `attachment; filename=\"${filename}\"`,\n },\n });\n } catch {\n return NextResponse.json({ error: 'Internal server error' }, { status: 500 });\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"standalone\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/profiles/[id]/export/route\",\n pathname: \"/api/profiles/[id]/export\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/app/api/profiles/[id]/export/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/profiles/[id]/export/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\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AY,CAAC,kBAAkB,AAC7F,EAAQ,GAAG,CAAC,gBAAiB,CAAA,EAAA,EAAA,qBAAA,AAAqB,EAAC,EAAW,YAAY,GAE9E,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,CAChC,UACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,EACA,MAAM,EAAe,EADT,CAGZ,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[4]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},57181,e=>{"use strict";var t=e.i(24868),r=e.i(22734),i=e.i(14747),n=e.i(46786),a=e.i(89196);let o=(0,i.join)((0,n.homedir)(),".config","opencode"),s=(0,i.join)(o,"oh-my-openagent.jsonc"),l=(0,i.join)(o,"oh-my-opencode.jsonc"),d="https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/v3.15.2/assets/oh-my-opencode.schema.json";function p(e){let t="object"!=typeof e||null===e||Array.isArray(e)?{}:{...e};return{...t,openEditorTargetMode:"hub"===t.openEditorTargetMode?"hub":"remote"}}function u(e=s){return e!==s?e:(0,r.existsSync)(s)?s:(0,r.existsSync)(l)?l:s}function c(e=s){try{return(0,r.existsSync)(u(e))}catch{return!1}}async function f(e=s){try{let r=await (0,t.readFile)(u(e),"utf-8");return(0,a.parse)(r,null,!1)}catch{return{}}}async function m(e,n=s){try{let o=(0,i.join)(n,"..");(0,r.existsSync)(o)||(0,r.mkdirSync)(o,{recursive:!0});let l=n===s?{...e,$schema:e.$schema||d}:e,p=(0,a.stringify)(l,null,2);await (0,t.writeFile)(n,p,"utf-8")}catch(e){throw Error(`Failed to write config: ${e}`)}}e.s(["OH_MY_OPENAGENT_CONFIG_SCHEMA",0,d,"detectConfig",()=>c,"normalizeVibePulseConfig",()=>p,"readConfig",()=>f,"resolveConfigPath",()=>u,"writeConfig",()=>m])},53977,e=>{"use strict";var t=e.i(24868),r=e.i(22734),i=e.i(14747),n=e.i(46786),a=e.i(89196),o=e.i(57181);let s=(0,i.join)((0,n.homedir)(),".config","opencode","profiles"),l=(0,i.join)(s,"index.json"),d=[{id:"balanced",name:"Balanced",emoji:"⚖️",description:"Balanced multi-model orchestration optimized for general coding tasks",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),isBuiltIn:!0}],p={balanced:{agents:{sisyphus:{model:"anthropic/claude-opus-4-6",variant:"max",temperature:.2,top_p:.9},oracle:{model:"openai/gpt-5.4",variant:"high",temperature:.2,top_p:.9},prometheus:{model:"anthropic/claude-opus-4-6",variant:"max",temperature:.2,top_p:.9},metis:{model:"anthropic/claude-opus-4-6",variant:"max",temperature:.2,top_p:.9},momus:{model:"openai/gpt-5.4",variant:"medium",temperature:.2,top_p:.9},atlas:{model:"anthropic/claude-sonnet-4-6",temperature:.2,top_p:.9},hephaestus:{model:"openai/gpt-5.4",variant:"medium",temperature:.2,top_p:.9},librarian:{model:"minimax-m2.7",temperature:.3,top_p:.9},explore:{model:"grok-code-fast-1",temperature:.1,top_p:.9},"multimodal-looker":{model:"openai/gpt-5.4",variant:"medium",temperature:.2,top_p:.9},"frontend-ui-ux":{model:"google/gemini-3.1-pro",variant:"high",temperature:.3,top_p:.9}},categories:{"visual-engineering":{model:"google/gemini-3.1-pro",variant:"high"},ultrabrain:{model:"openai/gpt-5.4",variant:"xhigh"},deep:{model:"openai/gpt-5.4",variant:"medium"},artistry:{model:"google/gemini-3.1-pro",variant:"high"},quick:{model:"openai/gpt-5.4-mini",temperature:.1},"unspecified-low":{model:"anthropic/claude-sonnet-4-6",temperature:.2},"unspecified-high":{model:"anthropic/claude-opus-4-6",variant:"max",temperature:.2},writing:{model:"google/gemini-3-flash",temperature:.3}}}};function u(){(0,r.existsSync)(s)||(0,r.mkdirSync)(s,{recursive:!0})}function c(e){return(0,i.join)(s,`${e}.json`)}function f(e){if(!e||"object"!=typeof e)return{$schema:o.OH_MY_OPENAGENT_CONFIG_SCHEMA,agents:{}};let t=e.agents&&"object"==typeof e.agents?e.agents:{},r=e.categories&&"object"==typeof e.categories?e.categories:void 0;return{$schema:"string"==typeof e.$schema&&e.$schema.trim().length>0?e.$schema:o.OH_MY_OPENAGENT_CONFIG_SCHEMA,agents:t,categories:r}}function m(){return{version:1,profiles:[...d],activeProfileId:null,lastModified:new Date().toISOString()}}async function g(){let e=new Set(d.map(e=>e.id));for(let i of["coding","writing","debug","minimal"])if(!e.has(i)){let e=c(i);(0,r.existsSync)(e)&&await (0,t.unlink)(e)}for(let e of d){let t=p[e.id]||{agents:{}};await E(e.id,t)}}async function h(){return y(!0)}async function w(){return y(!1)}async function y(e){try{if(u(),!(0,r.existsSync)(l)){let e=m();return await x(e),await g(),e}let e=await (0,t.readFile)(l,"utf-8"),i=(0,a.parse)(e,null,!1),n=!1;for(let e of d)i.profiles.some(t=>t.id===e.id)||(i.profiles.push(e),n=!0);let o=new Set(d.map(e=>e.id)),s=i.profiles.length;return i.profiles=i.profiles.filter(e=>!e.isBuiltIn||o.has(e.id)),i.profiles.length!==s&&(n=!0),await g(),n&&(i.lastModified=new Date().toISOString(),await x(i)),i}catch(t){if(!e)throw t;return m()}}async function x(e){u(),e.lastModified=new Date().toISOString();let r=(0,a.stringify)(e,null,2);await (0,t.writeFile)(l,r,"utf-8")}async function v(e){try{let i=c(e);if(!(0,r.existsSync)(i))return{$schema:o.OH_MY_OPENAGENT_CONFIG_SCHEMA,agents:{}};let n=await (0,t.readFile)(i,"utf-8"),s=(0,a.parse)(n,null,!1),l=f(s);if(!s||"object"!=typeof s||"string"!=typeof s.$schema)try{await E(e,l)}catch{}return l}catch{return{$schema:o.OH_MY_OPENAGENT_CONFIG_SCHEMA,agents:{}}}}async function E(e,r){u();let i=c(e),n=(0,a.stringify)(f(r),null,2);await (0,t.writeFile)(i,n,"utf-8")}async function R(e){let i=(await h()).profiles.find(t=>t.id===e);if(i?.isBuiltIn){let t=p[e]||{agents:{}};return await E(e,t),!0}let n=c(e);return!!(0,r.existsSync)(n)&&(await (0,t.unlink)(n),!0)}async function S(e){return(await h()).profiles.find(t=>t.id===e)}async function C(e){let t=await h();t.activeProfileId=e,await x(t)}e.s(["deleteProfileConfig",()=>R,"getProfileById",()=>S,"readProfileConfig",()=>v,"readProfileIndex",()=>h,"readProfileIndexStrict",()=>w,"setActiveProfileId",()=>C,"writeProfileConfig",()=>E,"writeProfileIndex",()=>x])},11451,e=>{"use strict";function t(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function r(e){return t(e)?{agents:t(e.agents)?e.agents:{},categories:t(e.categories)?e.categories:void 0}:{agents:{}}}function i(e,t){return{version:1,source:"vibepulse",exportedAt:new Date().toISOString(),profile:{id:e.id,name:e.name,emoji:e.emoji,description:e.description},config:r(t)}}function n(e){if(!t(e))throw Error("Imported profile file must be a JSON object");let i=e.profile;if(!t(i))throw Error("Imported profile file is missing a valid profile block");let n=i.id;if("string"!=typeof n||""===n.trim())throw Error("Imported profile id is required");if(!/^[a-zA-Z0-9_-]+$/.test(n.trim()))throw Error("Imported profile id must contain only letters, numbers, hyphens, and underscores");let a=i.name;if("string"!=typeof a||""===a.trim())throw Error("Imported profile name is required");let o=i.emoji,s=i.description;return{profile:{id:n.trim(),name:a.trim(),emoji:"string"==typeof o&&o.trim()?o:"⚙️",description:"string"==typeof s&&s.trim()?s.trim():void 0},config:r(e.config)}}e.s(["createExportedProfileFile",()=>i,"parseImportedProfileFile",()=>n])},99469,e=>{"use strict";var t=e.i(47909),r=e.i(74017),i=e.i(96250),n=e.i(59756),a=e.i(61916),o=e.i(74677),s=e.i(69741),l=e.i(16795),d=e.i(87718),p=e.i(95169),u=e.i(47587),c=e.i(66012),f=e.i(70101),m=e.i(26937),g=e.i(10372),h=e.i(93695);e.i(52474);var w=e.i(220),y=e.i(89171),x=e.i(53977),v=e.i(11451);class E extends Error{}async function R(e){try{let t,r,i;try{t=await e.json()}catch{throw new E("Request body must be valid JSON")}try{({profile:r,config:i}=(0,v.parseImportedProfileFile)(t))}catch(t){let e=t instanceof Error?t.message:"Imported profile file is invalid";throw new E(e)}let n=await (0,x.readProfileIndexStrict)();if(n.profiles.find(e=>e.id===r.id))return y.NextResponse.json({error:`Profile with id '${r.id}' already exists`},{status:400});let a=new Date().toISOString(),o={id:r.id,name:r.name,emoji:r.emoji,description:r.description,createdAt:a,updatedAt:a,isBuiltIn:!1,isDefault:!1};n.profiles.push(o),await (0,x.writeProfileIndex)(n);try{await (0,x.writeProfileConfig)(o.id,i)}catch{throw n.profiles=n.profiles.filter(e=>e.id!==o.id),await (0,x.writeProfileIndex)(n),Error("Failed to persist imported profile config")}return y.NextResponse.json({profile:o},{status:201})}catch(r){let e=r instanceof E?r.message:"Failed to import profile due to a server error",t=r instanceof E?400:500;return y.NextResponse.json({error:e},{status:t})}}e.s(["POST",()=>R],89104);var S=e.i(89104);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/profiles/import/route",pathname:"/api/profiles/import",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/profiles/import/route.ts",nextConfigOutput:"standalone",userland:S}),{workAsyncStorage:_,workUnitAsyncStorage:A,serverHooks:b}=C;function I(){return(0,i.patchFetch)({workAsyncStorage:_,workUnitAsyncStorage:A})}async function P(e,t,i){C.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let y="/api/profiles/import/route";y=y.replace(/\/index$/,"")||"/";let x=await C.prepare(e,t,{srcPage:y,multiZoneDraftMode:!1});if(!x)return t.statusCode=400,t.end("Bad Request"),null==i.waitUntil||i.waitUntil.call(i,Promise.resolve()),null;let{buildId:v,params:E,nextConfig:R,parsedUrl:S,isDraftMode:_,prerenderManifest:A,routerServerContext:b,isOnDemandRevalidate:I,revalidateOnlyGenerated:P,resolvedPathname:j,clientReferenceManifest:O,serverActionsManifest:N}=x,T=(0,s.normalizeAppPath)(y),k=!!(A.dynamicRoutes[T]||A.routes[j]),H=async()=>((null==b?void 0:b.render404)?await b.render404(e,t,S,!1):t.end("This page could not be found"),null);if(k&&!_){let e=!!A.routes[j],t=A.dynamicRoutes[T];if(t&&!1===t.fallback&&!e){if(R.experimental.adapterPath)return await H();throw new h.NoFallbackError}}let M=null;!k||C.isDev||_||(M="/index"===(M=j)?"/":M);let q=!0===C.isDev||!k,F=k&&!q;N&&O&&(0,o.setManifestsSingleton)({page:y,clientReferenceManifest:O,serverActionsManifest:N});let $=e.method||"GET",D=(0,a.getTracer)(),U=D.getActiveScopeSpan(),G={params:E,prerenderManifest:A,renderOpts:{experimental:{authInterrupts:!!R.experimental.authInterrupts},cacheComponents:!!R.cacheComponents,supportsDynamicResponse:q,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:R.cacheLife,waitUntil:i.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,i,n)=>C.onRequestError(e,t,i,n,b)},sharedContext:{buildId:v}},B=new l.NodeNextRequest(e),K=new l.NodeNextResponse(t),L=d.NextRequestAdapter.fromNodeNextRequest(B,(0,d.signalFromNodeResponse)(t));try{let o=async e=>C.handle(L,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=D.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let i=r.get("next.route");if(i){let t=`${$} ${i}`;e.setAttributes({"next.route":i,"http.route":i,"next.span_name":t}),e.updateName(t)}else e.updateName(`${$} ${y}`)}),s=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var a,l;let d=async({previousCacheEntry:r})=>{try{if(!s&&I&&P&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await o(n);e.fetchMetrics=G.renderOpts.fetchMetrics;let l=G.renderOpts.pendingWaitUntil;l&&i.waitUntil&&(i.waitUntil(l),l=void 0);let d=G.renderOpts.collectedTags;if(!k)return await (0,c.sendResponse)(B,K,a,G.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(a.headers);d&&(t[g.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,i=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:w.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:i}}}}catch(t){throw(null==r?void 0:r.isStale)&&await C.onRequestError(e,t,{routerKind:"App Router",routePath:y,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:I})},!1,b),t}},p=await C.handleResponse({req:e,nextConfig:R,cacheKey:M,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:I,revalidateOnlyGenerated:P,responseGenerator:d,waitUntil:i.waitUntil,isMinimalMode:s});if(!k)return null;if((null==p||null==(a=p.value)?void 0:a.kind)!==w.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(l=p.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",I?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),_&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let h=(0,f.fromNodeOutgoingHttpHeaders)(p.value.headers);return s&&k||h.delete(g.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||h.get("Cache-Control")||h.set("Cache-Control",(0,m.getCacheControlHeader)(p.cacheControl)),await (0,c.sendResponse)(B,K,new Response(p.value.body,{headers:h,status:p.value.status||200})),null};U?await l(U):await D.withPropagatedContext(e.headers,()=>D.trace(p.BaseServerSpan.handleRequest,{spanName:`${$} ${y}`,kind:a.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},l))}catch(t){if(t instanceof h.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:T,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:I})},!1,b),k)throw t;return await (0,c.sendResponse)(B,K,new Response(null,{status:500})),null}}e.s(["handler",()=>P,"patchFetch",()=>I,"routeModule",()=>C,"serverHooks",()=>b,"workAsyncStorage",()=>_,"workUnitAsyncStorage",()=>A],99469)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__8da6c5a8._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/opencodeConfig.ts","../../../src/lib/profiles/storage.ts","../../../src/lib/profiles/share.ts","../../../src/app/api/profiles/import/route.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["import { readFile, writeFile } from 'fs/promises';\nimport { existsSync, mkdirSync } from 'fs';\nimport { join } from 'path';\nimport { homedir } from 'os';\nimport { parse, stringify } from 'comment-json';\nimport type { OhMyOpenAgentConfig, OpenEditorTargetMode, VibePulseConfig } from '@/types/opencodeConfig';\n\nexport const CONFIG_DIR = join(homedir(), '.config', 'opencode');\nexport const CONFIG_PATH = join(CONFIG_DIR, 'oh-my-openagent.jsonc');\nexport const LEGACY_CONFIG_PATH = join(CONFIG_DIR, 'oh-my-opencode.jsonc');\nexport const OH_MY_OPENAGENT_CONFIG_SCHEMA = 'https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/v3.15.2/assets/oh-my-opencode.schema.json';\nexport const DEFAULT_OPEN_EDITOR_TARGET_MODE: OpenEditorTargetMode = 'remote';\n\nexport type OpenCodeConfig = OhMyOpenAgentConfig;\n\nexport function normalizeOpenEditorTargetMode(value: unknown): OpenEditorTargetMode {\n return value === 'hub' ? 'hub' : DEFAULT_OPEN_EDITOR_TARGET_MODE;\n}\n\nexport function normalizeVibePulseConfig(value: unknown): VibePulseConfig {\n const vibepulse = typeof value === 'object' && value !== null && !Array.isArray(value)\n ? { ...(value as Record<string, unknown>) }\n : {};\n\n return {\n ...vibepulse,\n openEditorTargetMode: normalizeOpenEditorTargetMode(vibepulse.openEditorTargetMode),\n };\n}\n\nexport function resolveConfigPath(configPath: string = CONFIG_PATH): string {\n if (configPath !== CONFIG_PATH) {\n return configPath;\n }\n\n if (existsSync(CONFIG_PATH)) {\n return CONFIG_PATH;\n }\n\n if (existsSync(LEGACY_CONFIG_PATH)) {\n return LEGACY_CONFIG_PATH;\n }\n\n return CONFIG_PATH;\n}\n\nexport function detectConfig(configPath: string = CONFIG_PATH): boolean {\n try {\n return existsSync(resolveConfigPath(configPath));\n } catch {\n return false;\n }\n}\n\nexport async function readConfig(configPath: string = CONFIG_PATH): Promise<OpenCodeConfig> {\n try {\n const content = await readFile(resolveConfigPath(configPath), 'utf-8');\n const config = parse(content, null, false) as OpenCodeConfig;\n return config;\n } catch {\n return {};\n }\n}\n\nexport async function writeConfig(\n config: OpenCodeConfig, \n configPath: string = CONFIG_PATH\n): Promise<void> {\n try {\n const configDir = join(configPath, '..');\n if (!existsSync(configDir)) {\n mkdirSync(configDir, { recursive: true });\n }\n\n const shouldEnforceSchema = configPath === CONFIG_PATH;\n const configWithSchema: OpenCodeConfig = shouldEnforceSchema\n ? {\n ...config,\n $schema: config.$schema || OH_MY_OPENAGENT_CONFIG_SCHEMA,\n }\n : config;\n\n const content = stringify(configWithSchema, null, 2);\n await writeFile(configPath, content, 'utf-8');\n } catch (error) {\n throw new Error(`Failed to write config: ${error}`);\n }\n}\n","import { readFile, writeFile, unlink } from 'fs/promises';\nimport { existsSync, mkdirSync } from 'fs';\nimport { join } from 'path';\nimport { homedir } from 'os';\nimport { parse, stringify } from 'comment-json';\nimport { OH_MY_OPENAGENT_CONFIG_SCHEMA } from '../opencodeConfig';\nimport type { AgentConfig, CategoryConfig } from '@/types/opencodeConfig';\n\nexport const PROFILES_DIR = join(homedir(), '.config', 'opencode', 'profiles');\nexport const PROFILE_INDEX_PATH = join(PROFILES_DIR, 'index.json');\n\nexport interface Profile {\n id: string;\n name: string;\n emoji: string;\n description?: string;\n createdAt: string;\n updatedAt: string;\n isDefault?: boolean;\n isBuiltIn?: boolean;\n}\n\nexport interface ProfileIndex {\n version: number;\n profiles: Profile[];\n activeProfileId: string | null;\n lastModified: string;\n}\n\nexport interface ProfileConfig {\n $schema?: string;\n agents: Record<string, AgentConfig>;\n categories?: Record<string, CategoryConfig>;\n}\n\nconst BUILTIN_PROFILES: Profile[] = [\n {\n id: 'balanced',\n name: 'Balanced',\n emoji: '⚖️',\n description: 'Balanced multi-model orchestration optimized for general coding tasks',\n createdAt: new Date().toISOString(),\n updatedAt: new Date().toISOString(),\n isBuiltIn: true,\n },\n];\n\nconst BUILTIN_PROFILE_CONFIGS: Record<string, ProfileConfig> = {\n balanced: {\n agents: {\n sisyphus: {\n model: 'anthropic/claude-opus-4-6',\n variant: 'max',\n temperature: 0.2,\n top_p: 0.9,\n },\n oracle: {\n model: 'openai/gpt-5.4',\n variant: 'high',\n temperature: 0.2,\n top_p: 0.9,\n },\n prometheus: {\n model: 'anthropic/claude-opus-4-6',\n variant: 'max',\n temperature: 0.2,\n top_p: 0.9,\n },\n metis: {\n model: 'anthropic/claude-opus-4-6',\n variant: 'max',\n temperature: 0.2,\n top_p: 0.9,\n },\n momus: {\n model: 'openai/gpt-5.4',\n variant: 'medium',\n temperature: 0.2,\n top_p: 0.9,\n },\n atlas: {\n model: 'anthropic/claude-sonnet-4-6',\n temperature: 0.2,\n top_p: 0.9,\n },\n hephaestus: {\n model: 'openai/gpt-5.4',\n variant: 'medium',\n temperature: 0.2,\n top_p: 0.9,\n },\n librarian: {\n model: 'minimax-m2.7',\n temperature: 0.3,\n top_p: 0.9,\n },\n explore: {\n model: 'grok-code-fast-1',\n temperature: 0.1,\n top_p: 0.9,\n },\n 'multimodal-looker': {\n model: 'openai/gpt-5.4',\n variant: 'medium',\n temperature: 0.2,\n top_p: 0.9,\n },\n 'frontend-ui-ux': {\n model: 'google/gemini-3.1-pro',\n variant: 'high',\n temperature: 0.3,\n top_p: 0.9,\n },\n },\n categories: {\n 'visual-engineering': {\n model: 'google/gemini-3.1-pro',\n variant: 'high',\n },\n ultrabrain: {\n model: 'openai/gpt-5.4',\n variant: 'xhigh',\n },\n deep: {\n model: 'openai/gpt-5.4',\n variant: 'medium',\n },\n artistry: {\n model: 'google/gemini-3.1-pro',\n variant: 'high',\n },\n quick: {\n model: 'openai/gpt-5.4-mini',\n temperature: 0.1,\n },\n 'unspecified-low': {\n model: 'anthropic/claude-sonnet-4-6',\n temperature: 0.2,\n },\n 'unspecified-high': {\n model: 'anthropic/claude-opus-4-6',\n variant: 'max',\n temperature: 0.2,\n },\n writing: {\n model: 'google/gemini-3-flash',\n temperature: 0.3,\n },\n },\n },\n};\n\nexport function ensureProfilesDir(): void {\n if (!existsSync(PROFILES_DIR)) {\n mkdirSync(PROFILES_DIR, { recursive: true });\n }\n}\n\nfunction getProfileConfigPath(id: string): string {\n return join(PROFILES_DIR, `${id}.json`);\n}\n\nfunction normalizeProfileConfig(config: unknown): ProfileConfig {\n if (!config || typeof config !== 'object') {\n return {\n $schema: OH_MY_OPENAGENT_CONFIG_SCHEMA,\n agents: {},\n };\n }\n\n const candidate = config as Record<string, unknown>;\n const agents =\n candidate.agents && typeof candidate.agents === 'object'\n ? (candidate.agents as Record<string, AgentConfig>)\n : {};\n\n const categories =\n candidate.categories && typeof candidate.categories === 'object'\n ? (candidate.categories as Record<string, CategoryConfig>)\n : undefined;\n\n const schema =\n typeof candidate.$schema === 'string' && candidate.$schema.trim().length > 0\n ? candidate.$schema\n : OH_MY_OPENAGENT_CONFIG_SCHEMA;\n\n return {\n $schema: schema,\n agents,\n categories,\n };\n}\n\nfunction createDefaultProfileIndex(): ProfileIndex {\n return {\n version: 1,\n profiles: [...BUILTIN_PROFILES],\n activeProfileId: null,\n lastModified: new Date().toISOString(),\n };\n}\n\nasync function createBuiltinProfileConfigs(): Promise<void> {\n const validBuiltinIds = new Set(BUILTIN_PROFILES.map(p => p.id));\n const deprecatedBuiltinIds = ['coding', 'writing', 'debug', 'minimal'];\n\n for (const deprecatedId of deprecatedBuiltinIds) {\n if (!validBuiltinIds.has(deprecatedId)) {\n const deprecatedConfigPath = getProfileConfigPath(deprecatedId);\n if (existsSync(deprecatedConfigPath)) {\n await unlink(deprecatedConfigPath);\n }\n }\n }\n\n for (const profile of BUILTIN_PROFILES) {\n const config = BUILTIN_PROFILE_CONFIGS[profile.id] || { agents: {} };\n await writeProfileConfig(profile.id, config);\n }\n}\n\nexport async function readProfileIndex(): Promise<ProfileIndex> {\n return readProfileIndexInternal(true);\n}\n\nexport async function readProfileIndexStrict(): Promise<ProfileIndex> {\n return readProfileIndexInternal(false);\n}\n\nasync function readProfileIndexInternal(fallbackOnError: boolean): Promise<ProfileIndex> {\n try {\n ensureProfilesDir();\n\n if (!existsSync(PROFILE_INDEX_PATH)) {\n const defaultIndex = createDefaultProfileIndex();\n await writeProfileIndex(defaultIndex);\n await createBuiltinProfileConfigs();\n return defaultIndex;\n }\n\n const content = await readFile(PROFILE_INDEX_PATH, 'utf-8');\n const index = parse(content, null, false) as unknown as ProfileIndex;\n \n // Ensure all built-in profiles exist in the index\n let modified = false;\n for (const builtinProfile of BUILTIN_PROFILES) {\n const exists = index.profiles.some(p => p.id === builtinProfile.id);\n if (!exists) {\n index.profiles.push(builtinProfile);\n modified = true;\n }\n }\n \n // Remove built-in profiles that are no longer in BUILTIN_PROFILES\n const builtinIds = new Set(BUILTIN_PROFILES.map(p => p.id));\n const oldLength = index.profiles.length;\n index.profiles = index.profiles.filter(p => !p.isBuiltIn || builtinIds.has(p.id));\n if (index.profiles.length !== oldLength) {\n modified = true;\n }\n \n await createBuiltinProfileConfigs();\n \n if (modified) {\n index.lastModified = new Date().toISOString();\n await writeProfileIndex(index);\n }\n \n return index;\n } catch (error) {\n if (!fallbackOnError) {\n throw error;\n }\n return createDefaultProfileIndex();\n }\n}\n\nexport async function writeProfileIndex(index: ProfileIndex): Promise<void> {\n ensureProfilesDir();\n \n index.lastModified = new Date().toISOString();\n const content = stringify(index, null, 2);\n \n await writeFile(PROFILE_INDEX_PATH, content, 'utf-8');\n}\n\n\nexport async function readProfileConfig(id: string): Promise<ProfileConfig> {\n try {\n const configPath = getProfileConfigPath(id);\n \n if (!existsSync(configPath)) {\n return {\n $schema: OH_MY_OPENAGENT_CONFIG_SCHEMA,\n agents: {},\n };\n }\n\n const content = await readFile(configPath, 'utf-8');\n const parsedConfig = parse(content, null, false) as unknown;\n const normalizedConfig = normalizeProfileConfig(parsedConfig);\n\n if (\n !parsedConfig ||\n typeof parsedConfig !== 'object' ||\n typeof (parsedConfig as { $schema?: unknown }).$schema !== 'string'\n ) {\n try {\n await writeProfileConfig(id, normalizedConfig);\n } catch {\n return normalizedConfig;\n }\n }\n\n return normalizedConfig;\n } catch {\n return {\n $schema: OH_MY_OPENAGENT_CONFIG_SCHEMA,\n agents: {},\n };\n }\n}\n\nexport async function writeProfileConfig(\n id: string, \n config: ProfileConfig\n): Promise<void> {\n ensureProfilesDir();\n\n const configPath = getProfileConfigPath(id);\n const content = stringify(normalizeProfileConfig(config), null, 2);\n\n await writeFile(configPath, content, 'utf-8');\n}\n\nexport async function deleteProfileConfig(id: string): Promise<boolean> {\n const index = await readProfileIndex();\n const profile = index.profiles.find(p => p.id === id);\n \n if (profile?.isBuiltIn) {\n const defaultConfig = BUILTIN_PROFILE_CONFIGS[id] || { agents: {} };\n await writeProfileConfig(id, defaultConfig);\n return true;\n }\n \n const configPath = getProfileConfigPath(id);\n \n if (!existsSync(configPath)) {\n return false;\n }\n \n await unlink(configPath);\n return true;\n}\n\nexport async function getProfileById(id: string): Promise<Profile | undefined> {\n const index = await readProfileIndex();\n return index.profiles.find(p => p.id === id);\n}\n\nexport async function getActiveProfileId(): Promise<string | null> {\n const index = await readProfileIndex();\n return index.activeProfileId;\n}\n\nexport async function setActiveProfileId(id: string | null): Promise<void> {\n const index = await readProfileIndex();\n index.activeProfileId = id;\n await writeProfileIndex(index);\n}\n","import type { Profile, ProfileConfig } from '@/types/opencodeConfig';\n\nexport interface ExportedProfileFile {\n version: 1;\n source: 'vibepulse';\n exportedAt: string;\n profile: {\n id: string;\n name: string;\n emoji: string;\n description?: string;\n };\n config: ProfileConfig;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction normalizeConfig(value: unknown): ProfileConfig {\n if (!isRecord(value)) {\n return { agents: {} };\n }\n\n return {\n agents: isRecord(value.agents) ? (value.agents as ProfileConfig['agents']) : {},\n categories: isRecord(value.categories)\n ? (value.categories as NonNullable<ProfileConfig['categories']>)\n : undefined,\n };\n}\n\nexport function createExportedProfileFile(\n profile: Profile,\n config: ProfileConfig\n): ExportedProfileFile {\n return {\n version: 1,\n source: 'vibepulse',\n exportedAt: new Date().toISOString(),\n profile: {\n id: profile.id,\n name: profile.name,\n emoji: profile.emoji,\n description: profile.description,\n },\n config: normalizeConfig(config),\n };\n}\n\nexport function parseImportedProfileFile(value: unknown): {\n profile: ExportedProfileFile['profile'];\n config: ProfileConfig;\n} {\n if (!isRecord(value)) {\n throw new Error('Imported profile file must be a JSON object');\n }\n\n const profileValue = value.profile;\n if (!isRecord(profileValue)) {\n throw new Error('Imported profile file is missing a valid profile block');\n }\n\n const id = profileValue.id;\n if (typeof id !== 'string' || id.trim() === '') {\n throw new Error('Imported profile id is required');\n }\n\n if (!/^[a-zA-Z0-9_-]+$/.test(id.trim())) {\n throw new Error('Imported profile id must contain only letters, numbers, hyphens, and underscores');\n }\n\n const name = profileValue.name;\n if (typeof name !== 'string' || name.trim() === '') {\n throw new Error('Imported profile name is required');\n }\n\n const emojiValue = profileValue.emoji;\n const descriptionValue = profileValue.description;\n\n return {\n profile: {\n id: id.trim(),\n name: name.trim(),\n emoji: typeof emojiValue === 'string' && emojiValue.trim() ? emojiValue : '⚙️',\n description:\n typeof descriptionValue === 'string' && descriptionValue.trim()\n ? descriptionValue.trim()\n : undefined,\n },\n config: normalizeConfig(value.config),\n };\n}\n","import { NextRequest, NextResponse } from 'next/server';\nimport { readProfileIndexStrict, writeProfileConfig, writeProfileIndex } from '@/lib/profiles/storage';\nimport { parseImportedProfileFile } from '@/lib/profiles/share';\nimport type { Profile } from '@/types/opencodeConfig';\n\nclass ImportBadRequestError extends Error {}\n\nexport async function POST(request: NextRequest) {\n try {\n let body: unknown;\n try {\n body = await request.json();\n } catch {\n throw new ImportBadRequestError('Request body must be valid JSON');\n }\n\n let importedProfile: { id: string; name: string; emoji: string; description?: string };\n let config: Parameters<typeof writeProfileConfig>[1];\n try {\n ({ profile: importedProfile, config } = parseImportedProfileFile(body));\n } catch (error) {\n const message = error instanceof Error ? error.message : 'Imported profile file is invalid';\n throw new ImportBadRequestError(message);\n }\n\n const index = await readProfileIndexStrict();\n const existingProfile = index.profiles.find(profile => profile.id === importedProfile.id);\n if (existingProfile) {\n return NextResponse.json(\n { error: `Profile with id '${importedProfile.id}' already exists` },\n { status: 400 }\n );\n }\n\n const now = new Date().toISOString();\n const profile: Profile = {\n id: importedProfile.id,\n name: importedProfile.name,\n emoji: importedProfile.emoji,\n description: importedProfile.description,\n createdAt: now,\n updatedAt: now,\n isBuiltIn: false,\n isDefault: false,\n };\n\n index.profiles.push(profile);\n await writeProfileIndex(index);\n try {\n await writeProfileConfig(profile.id, config);\n } catch {\n index.profiles = index.profiles.filter(existing => existing.id !== profile.id);\n await writeProfileIndex(index);\n throw new Error('Failed to persist imported profile config');\n }\n\n return NextResponse.json({ profile }, { status: 201 });\n } catch (error) {\n const message =\n error instanceof ImportBadRequestError ? error.message : 'Failed to import profile due to a server error';\n const status = error instanceof ImportBadRequestError ? 400 : 500;\n\n return NextResponse.json({ error: message }, { status });\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"standalone\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/profiles/import/route\",\n pathname: \"/api/profiles/import\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/app/api/profiles/import/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/profiles/import/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, n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AU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,EACA,sBACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[4]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[33405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},57181,e=>{"use strict";var t=e.i(24868),r=e.i(22734),n=e.i(14747),a=e.i(46786),o=e.i(89196);let i=(0,n.join)((0,a.homedir)(),".config","opencode"),s=(0,n.join)(i,"oh-my-openagent.jsonc"),l=(0,n.join)(i,"oh-my-opencode.jsonc"),u="https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/v3.15.2/assets/oh-my-opencode.schema.json";function d(e){let t="object"!=typeof e||null===e||Array.isArray(e)?{}:{...e};return{...t,openEditorTargetMode:"hub"===t.openEditorTargetMode?"hub":"remote"}}function c(e=s){return e!==s?e:(0,r.existsSync)(s)?s:(0,r.existsSync)(l)?l:s}function p(e=s){try{return(0,r.existsSync)(c(e))}catch{return!1}}async function h(e=s){try{let r=await (0,t.readFile)(c(e),"utf-8");return(0,o.parse)(r,null,!1)}catch{return{}}}async function x(e,a=s){try{let i=(0,n.join)(a,"..");(0,r.existsSync)(i)||(0,r.mkdirSync)(i,{recursive:!0});let l=a===s?{...e,$schema:e.$schema||u}:e,d=(0,o.stringify)(l,null,2);await (0,t.writeFile)(a,d,"utf-8")}catch(e){throw Error(`Failed to write config: ${e}`)}}e.s(["OH_MY_OPENAGENT_CONFIG_SCHEMA",0,u,"detectConfig",()=>p,"normalizeVibePulseConfig",()=>d,"readConfig",()=>h,"resolveConfigPath",()=>c,"writeConfig",()=>x])},24361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},4911,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),a=e.i(59756),o=e.i(61916),i=e.i(74677),s=e.i(69741),l=e.i(16795),u=e.i(87718),d=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),x=e.i(26937),f=e.i(10372),g=e.i(93695);e.i(52474);var R=e.i(220),v=e.i(57181),y=e.i(33405);let m=(0,e.i(24361).promisify)(y.exec);async function w(){try{return await m("opencode --version"),!0}catch{return!1}}async function E(){let e=(0,v.detectConfig)(),t={hasConfig:e,hasOpenCodeCli:await w()};return e&&(t.path=(0,v.resolveConfigPath)()),Response.json(t)}e.s(["GET",()=>E],10460);var C=e.i(10460);let A=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/opencode-config/status/route",pathname:"/api/opencode-config/status",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/opencode-config/status/route.ts",nextConfigOutput:"standalone",userland:C}),{workAsyncStorage:b,workUnitAsyncStorage:T,serverHooks:P}=A;function N(){return(0,n.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:T})}async function _(e,t,n){A.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/opencode-config/status/route";v=v.replace(/\/index$/,"")||"/";let y=await A.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:m,params:w,nextConfig:E,parsedUrl:C,isDraftMode:b,prerenderManifest:T,routerServerContext:P,isOnDemandRevalidate:N,revalidateOnlyGenerated:_,resolvedPathname:O,clientReferenceManifest:S,serverActionsManifest:j}=y,q=(0,s.normalizeAppPath)(v),k=!!(T.dynamicRoutes[q]||T.routes[O]),H=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,C,!1):t.end("This page could not be found"),null);if(k&&!b){let e=!!T.routes[O],t=T.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await H();throw new g.NoFallbackError}}let I=null;!k||A.isDev||b||(I="/index"===(I=O)?"/":I);let M=!0===A.isDev||!k,U=k&&!M;j&&S&&(0,i.setManifestsSingleton)({page:v,clientReferenceManifest:S,serverActionsManifest:j});let D=e.method||"GET",F=(0,o.getTracer)(),$=F.getActiveScopeSpan(),K={params:w,prerenderManifest:T,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:M,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>A.onRequestError(e,t,n,a,P)},sharedContext:{buildId:m}},G=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),L=u.NextRequestAdapter.fromNodeNextRequest(G,(0,u.signalFromNodeResponse)(t));try{let i=async e=>A.handle(L,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${D} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${D} ${v}`)}),s=!!(0,a.getRequestMeta)(e,"minimalMode"),l=async a=>{var o,l;let u=async({previousCacheEntry:r})=>{try{if(!s&&N&&_&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let o=await i(a);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let u=K.renderOpts.collectedTags;if(!k)return await (0,p.sendResponse)(G,B,o,K.renderOpts.pendingWaitUntil),null;{let e=await o.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(o.headers);u&&(t[f.NEXT_CACHE_TAGS_HEADER]=u),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,n=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:R.CachedRouteKind.APP_ROUTE,status:o.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await A.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:N})},!1,P),t}},d=await A.handleResponse({req:e,nextConfig:E,cacheKey:I,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:_,responseGenerator:u,waitUntil:n.waitUntil,isMinimalMode:s});if(!k)return null;if((null==d||null==(o=d.value)?void 0:o.kind)!==R.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(l=d.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",N?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),b&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let g=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return s&&k||g.delete(f.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||g.get("Cache-Control")||g.set("Cache-Control",(0,x.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(G,B,new Response(d.value.body,{headers:g,status:d.value.status||200})),null};$?await l($):await F.withPropagatedContext(e.headers,()=>F.trace(d.BaseServerSpan.handleRequest,{spanName:`${D} ${v}`,kind:o.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},l))}catch(t){if(t instanceof g.NoFallbackError||await A.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:N})},!1,P),k)throw t;return await (0,p.sendResponse)(G,B,new Response(null,{status:500})),null}}e.s(["handler",()=>_,"patchFetch",()=>N,"routeModule",()=>A,"serverHooks",()=>P,"workAsyncStorage",()=>b,"workUnitAsyncStorage",()=>T],4911)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__b796d06c._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/opencodeConfig.ts","../../../src/app/api/opencode-config/status/route.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["import { readFile, writeFile } from 'fs/promises';\nimport { existsSync, mkdirSync } from 'fs';\nimport { join } from 'path';\nimport { homedir } from 'os';\nimport { parse, stringify } from 'comment-json';\nimport type { OhMyOpenAgentConfig, OpenEditorTargetMode, VibePulseConfig } from '@/types/opencodeConfig';\n\nexport const CONFIG_DIR = join(homedir(), '.config', 'opencode');\nexport const CONFIG_PATH = join(CONFIG_DIR, 'oh-my-openagent.jsonc');\nexport const LEGACY_CONFIG_PATH = join(CONFIG_DIR, 'oh-my-opencode.jsonc');\nexport const OH_MY_OPENAGENT_CONFIG_SCHEMA = 'https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/v3.15.2/assets/oh-my-opencode.schema.json';\nexport const DEFAULT_OPEN_EDITOR_TARGET_MODE: OpenEditorTargetMode = 'remote';\n\nexport type OpenCodeConfig = OhMyOpenAgentConfig;\n\nexport function normalizeOpenEditorTargetMode(value: unknown): OpenEditorTargetMode {\n return value === 'hub' ? 'hub' : DEFAULT_OPEN_EDITOR_TARGET_MODE;\n}\n\nexport function normalizeVibePulseConfig(value: unknown): VibePulseConfig {\n const vibepulse = typeof value === 'object' && value !== null && !Array.isArray(value)\n ? { ...(value as Record<string, unknown>) }\n : {};\n\n return {\n ...vibepulse,\n openEditorTargetMode: normalizeOpenEditorTargetMode(vibepulse.openEditorTargetMode),\n };\n}\n\nexport function resolveConfigPath(configPath: string = CONFIG_PATH): string {\n if (configPath !== CONFIG_PATH) {\n return configPath;\n }\n\n if (existsSync(CONFIG_PATH)) {\n return CONFIG_PATH;\n }\n\n if (existsSync(LEGACY_CONFIG_PATH)) {\n return LEGACY_CONFIG_PATH;\n }\n\n return CONFIG_PATH;\n}\n\nexport function detectConfig(configPath: string = CONFIG_PATH): boolean {\n try {\n return existsSync(resolveConfigPath(configPath));\n } catch {\n return false;\n }\n}\n\nexport async function readConfig(configPath: string = CONFIG_PATH): Promise<OpenCodeConfig> {\n try {\n const content = await readFile(resolveConfigPath(configPath), 'utf-8');\n const config = parse(content, null, false) as OpenCodeConfig;\n return config;\n } catch {\n return {};\n }\n}\n\nexport async function writeConfig(\n config: OpenCodeConfig, \n configPath: string = CONFIG_PATH\n): Promise<void> {\n try {\n const configDir = join(configPath, '..');\n if (!existsSync(configDir)) {\n mkdirSync(configDir, { recursive: true });\n }\n\n const shouldEnforceSchema = configPath === CONFIG_PATH;\n const configWithSchema: OpenCodeConfig = shouldEnforceSchema\n ? {\n ...config,\n $schema: config.$schema || OH_MY_OPENAGENT_CONFIG_SCHEMA,\n }\n : config;\n\n const content = stringify(configWithSchema, null, 2);\n await writeFile(configPath, content, 'utf-8');\n } catch (error) {\n throw new Error(`Failed to write config: ${error}`);\n }\n}\n","import { detectConfig, resolveConfigPath } from '@/lib/opencodeConfig';\nimport { exec } from 'child_process';\nimport { promisify } from 'util';\n\nconst execAsync = promisify(exec);\n\nasync function detectOpenCodeCli(): Promise<boolean> {\n try {\n await execAsync('opencode --version');\n return true;\n } catch {\n return false;\n }\n}\n\nexport async function GET() {\n const hasConfig = detectConfig();\n const hasOpenCodeCli = await detectOpenCodeCli();\n\n const response: { hasConfig: boolean; hasOpenCodeCli: boolean; path?: string } = {\n hasConfig,\n hasOpenCodeCli,\n };\n\n if (hasConfig) {\n response.path = resolveConfigPath();\n }\n\n return Response.json(response);\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"standalone\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/opencode-config/status/route\",\n pathname: \"/api/opencode-config/status\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/app/api/opencode-config/status/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/opencode-config/status/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"w8BAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAGO,IAAM,EAAa,CAAA,EAAA,EAAA,IAAA,AAAI,EAAC,CAAA,EAAA,EAAA,OAAA,AAAO,IAAI,UAAW,YACxC,EAAc,CAA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,CAAA,EAAA,EAAA,YAAY,AAAZ,EAAa,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,EACA,MAAM,EAAe,EADT,CAGZ,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[2]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},57181,e=>{"use strict";var t=e.i(24868),r=e.i(22734),n=e.i(14747),i=e.i(46786),a=e.i(89196);let o=(0,n.join)((0,i.homedir)(),".config","opencode"),s=(0,n.join)(o,"oh-my-openagent.jsonc"),l=(0,n.join)(o,"oh-my-opencode.jsonc"),u="https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/v3.15.2/assets/oh-my-opencode.schema.json";function d(e){let t="object"!=typeof e||null===e||Array.isArray(e)?{}:{...e};return{...t,openEditorTargetMode:"hub"===t.openEditorTargetMode?"hub":"remote"}}function p(e=s){return e!==s?e:(0,r.existsSync)(s)?s:(0,r.existsSync)(l)?l:s}function c(e=s){try{return(0,r.existsSync)(p(e))}catch{return!1}}async function f(e=s){try{let r=await (0,t.readFile)(p(e),"utf-8");return(0,a.parse)(r,null,!1)}catch{return{}}}async function m(e,i=s){try{let o=(0,n.join)(i,"..");(0,r.existsSync)(o)||(0,r.mkdirSync)(o,{recursive:!0});let l=i===s?{...e,$schema:e.$schema||u}:e,d=(0,a.stringify)(l,null,2);await (0,t.writeFile)(i,d,"utf-8")}catch(e){throw Error(`Failed to write config: ${e}`)}}e.s(["OH_MY_OPENAGENT_CONFIG_SCHEMA",0,u,"detectConfig",()=>c,"normalizeVibePulseConfig",()=>d,"readConfig",()=>f,"resolveConfigPath",()=>p,"writeConfig",()=>m])},53977,e=>{"use strict";var t=e.i(24868),r=e.i(22734),n=e.i(14747),i=e.i(46786),a=e.i(89196),o=e.i(57181);let s=(0,n.join)((0,i.homedir)(),".config","opencode","profiles"),l=(0,n.join)(s,"index.json"),u=[{id:"balanced",name:"Balanced",emoji:"⚖️",description:"Balanced multi-model orchestration optimized for general coding tasks",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),isBuiltIn:!0}],d={balanced:{agents:{sisyphus:{model:"anthropic/claude-opus-4-6",variant:"max",temperature:.2,top_p:.9},oracle:{model:"openai/gpt-5.4",variant:"high",temperature:.2,top_p:.9},prometheus:{model:"anthropic/claude-opus-4-6",variant:"max",temperature:.2,top_p:.9},metis:{model:"anthropic/claude-opus-4-6",variant:"max",temperature:.2,top_p:.9},momus:{model:"openai/gpt-5.4",variant:"medium",temperature:.2,top_p:.9},atlas:{model:"anthropic/claude-sonnet-4-6",temperature:.2,top_p:.9},hephaestus:{model:"openai/gpt-5.4",variant:"medium",temperature:.2,top_p:.9},librarian:{model:"minimax-m2.7",temperature:.3,top_p:.9},explore:{model:"grok-code-fast-1",temperature:.1,top_p:.9},"multimodal-looker":{model:"openai/gpt-5.4",variant:"medium",temperature:.2,top_p:.9},"frontend-ui-ux":{model:"google/gemini-3.1-pro",variant:"high",temperature:.3,top_p:.9}},categories:{"visual-engineering":{model:"google/gemini-3.1-pro",variant:"high"},ultrabrain:{model:"openai/gpt-5.4",variant:"xhigh"},deep:{model:"openai/gpt-5.4",variant:"medium"},artistry:{model:"google/gemini-3.1-pro",variant:"high"},quick:{model:"openai/gpt-5.4-mini",temperature:.1},"unspecified-low":{model:"anthropic/claude-sonnet-4-6",temperature:.2},"unspecified-high":{model:"anthropic/claude-opus-4-6",variant:"max",temperature:.2},writing:{model:"google/gemini-3-flash",temperature:.3}}}};function p(){(0,r.existsSync)(s)||(0,r.mkdirSync)(s,{recursive:!0})}function c(e){return(0,n.join)(s,`${e}.json`)}function f(e){if(!e||"object"!=typeof e)return{$schema:o.OH_MY_OPENAGENT_CONFIG_SCHEMA,agents:{}};let t=e.agents&&"object"==typeof e.agents?e.agents:{},r=e.categories&&"object"==typeof e.categories?e.categories:void 0;return{$schema:"string"==typeof e.$schema&&e.$schema.trim().length>0?e.$schema:o.OH_MY_OPENAGENT_CONFIG_SCHEMA,agents:t,categories:r}}function m(){return{version:1,profiles:[...u],activeProfileId:null,lastModified:new Date().toISOString()}}async function g(){let e=new Set(u.map(e=>e.id));for(let n of["coding","writing","debug","minimal"])if(!e.has(n)){let e=c(n);(0,r.existsSync)(e)&&await (0,t.unlink)(e)}for(let e of u){let t=d[e.id]||{agents:{}};await R(e.id,t)}}async function h(){return y(!0)}async function x(){return y(!1)}async function y(e){try{if(p(),!(0,r.existsSync)(l)){let e=m();return await w(e),await g(),e}let e=await (0,t.readFile)(l,"utf-8"),n=(0,a.parse)(e,null,!1),i=!1;for(let e of u)n.profiles.some(t=>t.id===e.id)||(n.profiles.push(e),i=!0);let o=new Set(u.map(e=>e.id)),s=n.profiles.length;return n.profiles=n.profiles.filter(e=>!e.isBuiltIn||o.has(e.id)),n.profiles.length!==s&&(i=!0),await g(),i&&(n.lastModified=new Date().toISOString(),await w(n)),n}catch(t){if(!e)throw t;return m()}}async function w(e){p(),e.lastModified=new Date().toISOString();let r=(0,a.stringify)(e,null,2);await (0,t.writeFile)(l,r,"utf-8")}async function v(e){try{let n=c(e);if(!(0,r.existsSync)(n))return{$schema:o.OH_MY_OPENAGENT_CONFIG_SCHEMA,agents:{}};let i=await (0,t.readFile)(n,"utf-8"),s=(0,a.parse)(i,null,!1),l=f(s);if(!s||"object"!=typeof s||"string"!=typeof s.$schema)try{await R(e,l)}catch{}return l}catch{return{$schema:o.OH_MY_OPENAGENT_CONFIG_SCHEMA,agents:{}}}}async function R(e,r){p();let n=c(e),i=(0,a.stringify)(f(r),null,2);await (0,t.writeFile)(n,i,"utf-8")}async function E(e){let n=(await h()).profiles.find(t=>t.id===e);if(n?.isBuiltIn){let t=d[e]||{agents:{}};return await R(e,t),!0}let i=c(e);return!!(0,r.existsSync)(i)&&(await (0,t.unlink)(i),!0)}async function C(e){return(await h()).profiles.find(t=>t.id===e)}async function _(e){let t=await h();t.activeProfileId=e,await w(t)}e.s(["deleteProfileConfig",()=>E,"getProfileById",()=>C,"readProfileConfig",()=>v,"readProfileIndex",()=>h,"readProfileIndexStrict",()=>x,"setActiveProfileId",()=>_,"writeProfileConfig",()=>R,"writeProfileIndex",()=>w])},62851,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),i=e.i(59756),a=e.i(61916),o=e.i(74677),s=e.i(69741),l=e.i(16795),u=e.i(87718),d=e.i(95169),p=e.i(47587),c=e.i(66012),f=e.i(70101),m=e.i(26937),g=e.i(10372),h=e.i(93695);e.i(52474);var x=e.i(220),y=e.i(89171),w=e.i(53977);async function v(){try{let e=await (0,w.readProfileIndex)();return y.NextResponse.json({profiles:e.profiles,activeProfileId:e.activeProfileId})}catch(e){return console.error("Error reading profiles:",e),y.NextResponse.json({error:"Internal server error"},{status:500})}}async function R(e){try{let t=await e.json();if(!t||"object"!=typeof t)return y.NextResponse.json({error:"Invalid request body"},{status:400});let r=t.profile||t,{id:n,name:i,emoji:a,description:o}=r,s=t.config||r.config;if(!n||"string"!=typeof n||""===n.trim())return y.NextResponse.json({error:"id is required and must be a non-empty string"},{status:400});if(!i||"string"!=typeof i||""===i.trim())return y.NextResponse.json({error:"name is required and must be a non-empty string"},{status:400});if(await (0,w.getProfileById)(n))return y.NextResponse.json({error:`Profile with id '${n}' already exists`},{status:400});if(!/^[a-zA-Z0-9_-]+$/.test(n))return y.NextResponse.json({error:"id must contain only letters, numbers, hyphens, and underscores"},{status:400});let l=new Date().toISOString(),u={id:n.trim(),name:i.trim(),emoji:a||"⚙️",description:o?.trim()||void 0,createdAt:l,updatedAt:l},d=await (0,w.readProfileIndex)();if(d.profiles.push(u),await (0,w.writeProfileIndex)(d),s&&"object"==typeof s){let e={agents:s.agents||{},categories:s.categories};await (0,w.writeProfileConfig)(n,e)}else await (0,w.writeProfileConfig)(n,{agents:{}});return y.NextResponse.json({profile:u},{status:201})}catch(e){return console.error("Error creating profile:",e),y.NextResponse.json({error:"Internal server error"},{status:500})}}e.s(["GET",()=>v,"POST",()=>R],77081);var E=e.i(77081);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/profiles/route",pathname:"/api/profiles",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/profiles/route.ts",nextConfigOutput:"standalone",userland:E}),{workAsyncStorage:_,workUnitAsyncStorage:S,serverHooks:P}=C;function j(){return(0,n.patchFetch)({workAsyncStorage:_,workUnitAsyncStorage:S})}async function b(e,t,n){C.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let y="/api/profiles/route";y=y.replace(/\/index$/,"")||"/";let w=await C.prepare(e,t,{srcPage:y,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:v,params:R,nextConfig:E,parsedUrl:_,isDraftMode:S,prerenderManifest:P,routerServerContext:j,isOnDemandRevalidate:b,revalidateOnlyGenerated:A,resolvedPathname:N,clientReferenceManifest:I,serverActionsManifest:O}=w,T=(0,s.normalizeAppPath)(y),k=!!(P.dynamicRoutes[T]||P.routes[N]),H=async()=>((null==j?void 0:j.render404)?await j.render404(e,t,_,!1):t.end("This page could not be found"),null);if(k&&!S){let e=!!P.routes[N],t=P.dynamicRoutes[T];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await H();throw new h.NoFallbackError}}let M=null;!k||C.isDev||S||(M="/index"===(M=N)?"/":M);let q=!0===C.isDev||!k,$=k&&!q;O&&I&&(0,o.setManifestsSingleton)({page:y,clientReferenceManifest:I,serverActionsManifest:O});let F=e.method||"GET",D=(0,a.getTracer)(),U=D.getActiveScopeSpan(),G={params:R,prerenderManifest:P,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:q,incrementalCache:(0,i.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,i)=>C.onRequestError(e,t,n,i,j)},sharedContext:{buildId:v}},B=new l.NodeNextRequest(e),K=new l.NodeNextResponse(t),L=u.NextRequestAdapter.fromNodeNextRequest(B,(0,u.signalFromNodeResponse)(t));try{let o=async e=>C.handle(L,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=D.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${F} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${F} ${y}`)}),s=!!(0,i.getRequestMeta)(e,"minimalMode"),l=async i=>{var a,l;let u=async({previousCacheEntry:r})=>{try{if(!s&&b&&A&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await o(i);e.fetchMetrics=G.renderOpts.fetchMetrics;let l=G.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let u=G.renderOpts.collectedTags;if(!k)return await (0,c.sendResponse)(B,K,a,G.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(a.headers);u&&(t[g.NEXT_CACHE_TAGS_HEADER]=u),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,n=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await C.onRequestError(e,t,{routerKind:"App Router",routePath:y,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:b})},!1,j),t}},d=await C.handleResponse({req:e,nextConfig:E,cacheKey:M,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:P,isRoutePPREnabled:!1,isOnDemandRevalidate:b,revalidateOnlyGenerated:A,responseGenerator:u,waitUntil:n.waitUntil,isMinimalMode:s});if(!k)return null;if((null==d||null==(a=d.value)?void 0:a.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(l=d.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",b?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),S&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let h=(0,f.fromNodeOutgoingHttpHeaders)(d.value.headers);return s&&k||h.delete(g.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||h.get("Cache-Control")||h.set("Cache-Control",(0,m.getCacheControlHeader)(d.cacheControl)),await (0,c.sendResponse)(B,K,new Response(d.value.body,{headers:h,status:d.value.status||200})),null};U?await l(U):await D.withPropagatedContext(e.headers,()=>D.trace(d.BaseServerSpan.handleRequest,{spanName:`${F} ${y}`,kind:a.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},l))}catch(t){if(t instanceof h.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:T,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:b})},!1,j),k)throw t;return await (0,c.sendResponse)(B,K,new Response(null,{status:500})),null}}e.s(["handler",()=>b,"patchFetch",()=>j,"routeModule",()=>C,"serverHooks",()=>P,"workAsyncStorage",()=>_,"workUnitAsyncStorage",()=>S],62851)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__c2ce5c0f._.js.map
|