@seqyuan/annodex 0.1.76 → 0.1.78
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 +11 -10
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/required-server-files.js +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +6 -0
- package/.next/server/app/_global-error/page.js +3 -3
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.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 +2 -2
- 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/agent/[id]/events/route.js +1 -1
- package/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/server/app/api/agent/new/route.js +1 -1
- package/.next/server/app/api/agent/runtime/route.js +2 -2
- package/.next/server/app/api/auth/all-providers/route.js +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/login/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/login/route.js +1 -1
- package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/providers/route.js +1 -1
- package/.next/server/app/api/auth/status/route.js +1 -1
- package/.next/server/app/api/default-cwd/route.js +1 -1
- package/.next/server/app/api/extensions/discover/route.js +1 -1
- package/.next/server/app/api/extensions/mcp/route.js +1 -1
- package/.next/server/app/api/extensions/plugin/route.js +1 -1
- package/.next/server/app/api/extensions/plugin-marketplace/route.js +1 -1
- package/.next/server/app/api/extensions/route.js +1 -1
- package/.next/server/app/api/extensions/session/route.js +1 -1
- package/.next/server/app/api/files/[...path]/route.js +1 -1
- package/.next/server/app/api/harness/route.js +1 -1
- package/.next/server/app/api/home/route.js +1 -1
- package/.next/server/app/api/im/cancel/route.js +2 -2
- package/.next/server/app/api/im/gateway-status/route.js +2 -2
- package/.next/server/app/api/im/gateway-token/route.js +2 -2
- package/.next/server/app/api/im/project/route.js +2 -2
- package/.next/server/app/api/im/project/route.js.nft.json +1 -1
- package/.next/server/app/api/im/projects/route.js +2 -2
- package/.next/server/app/api/im/session-ids/route.js +2 -0
- package/.next/server/app/api/im/session-ids/route.js.nft.json +1 -0
- package/.next/server/app/api/im/session-ids/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/im/turn/route.js +3 -3
- package/.next/server/app/api/images/upload/route.js +1 -1
- package/.next/server/app/api/internal/runtime/route.js +1 -1
- package/.next/server/app/api/memory/promote/route.js +2 -2
- package/.next/server/app/api/memory/recall/route.js +3 -3
- package/.next/server/app/api/memory/reflect/route.js +1 -1
- package/.next/server/app/api/memory/retain/route.js +2 -2
- package/.next/server/app/api/memory/status/route.js +1 -1
- package/.next/server/app/api/models/route.js +1 -1
- package/.next/server/app/api/models-config/discover/route.js +1 -1
- package/.next/server/app/api/models-config/route.js +1 -1
- package/.next/server/app/api/models-config/test/route.js +1 -1
- package/.next/server/app/api/projects/browse/route.js +1 -1
- package/.next/server/app/api/projects/route.js +1 -1
- package/.next/server/app/api/search/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/new/route.js +1 -1
- package/.next/server/app/api/sessions/route.js +1 -1
- package/.next/server/app/api/settings/route.js +1 -1
- package/.next/server/app/api/skills/install/route.js +2 -2
- package/.next/server/app/api/skills/route.js +2 -2
- package/.next/server/app/api/skills/search/route.js +1 -1
- package/.next/server/app/api/soul/route.js +1 -1
- package/.next/server/app/api/version/route.js +1 -1
- package/.next/server/app/docs/changelog/page.js +3 -3
- package/.next/server/app/docs/changelog/page_client-reference-manifest.js +1 -1
- package/.next/server/app/docs/changelog.html +2 -2
- package/.next/server/app/docs/changelog.rsc +2 -2
- package/.next/server/app/docs/changelog.segments/_full.segment.rsc +2 -2
- package/.next/server/app/docs/changelog.segments/_head.segment.rsc +1 -1
- package/.next/server/app/docs/changelog.segments/_index.segment.rsc +2 -2
- package/.next/server/app/docs/changelog.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/docs/changelog.segments/docs/changelog/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/docs/changelog.segments/docs/changelog.segment.rsc +1 -1
- package/.next/server/app/docs/changelog.segments/docs.segment.rsc +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +2 -2
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/index.segments/_full.segment.rsc +2 -2
- 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/login/page.js +2 -2
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +2 -2
- package/.next/server/app/login.segments/_full.segment.rsc +2 -2
- package/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/server/app/login.segments/_index.segment.rsc +2 -2
- package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspace/page.js +11 -11
- package/.next/server/app/workspace/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspace.html +1 -1
- package/.next/server/app/workspace.rsc +3 -3
- package/.next/server/app/workspace.segments/_full.segment.rsc +3 -3
- package/.next/server/app/workspace.segments/_head.segment.rsc +1 -1
- package/.next/server/app/workspace.segments/_index.segment.rsc +2 -2
- package/.next/server/app/workspace.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/workspace.segments/workspace/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/workspace.segments/workspace.segment.rsc +1 -1
- package/.next/server/app-paths-manifest.json +11 -10
- package/.next/server/chunks/6983.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/next-font-manifest.js +1 -1
- package/.next/server/next-font-manifest.json +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/PCWo0i-9jPzxDCD8M4m7o/_buildManifest.js +1 -0
- package/.next/static/chunks/app/_global-error/page-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/agent/runtime/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/auth/all-providers/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/extensions/discover/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/extensions/mcp/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/extensions/plugin/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/extensions/plugin-marketplace/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/extensions/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/extensions/session/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/harness/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/home/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/im/cancel/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/im/gateway-status/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/im/gateway-token/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/im/project/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/im/projects/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/im/session-ids/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/im/turn/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/images/upload/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/internal/runtime/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/memory/promote/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/memory/recall/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/memory/reflect/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/memory/retain/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/memory/status/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/models/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/models-config/discover/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/projects/browse/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/projects/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/search/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/sessions/new/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/settings/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/skills/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/soul/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/api/version/route-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/page-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/app/workspace/{page-5b2132873d8cc141.js → page-ea7520534f53c3bc.js} +12 -12
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-4d949d79c5bb42eb.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-4d949d79c5bb42eb.js +1 -0
- package/.next/static/css/64369b60e11cd629.css +1 -0
- package/package.json +1 -1
- package/.next/static/Z0pq0aCwepxcXabvqbI1m/_buildManifest.js +0 -1
- package/.next/static/chunks/app/_global-error/page-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/events/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/agent/new/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/agent/runtime/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/auth/all-providers/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/auth/login/[provider]/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/auth/providers/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/default-cwd/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/extensions/discover/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/extensions/mcp/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/extensions/plugin/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/extensions/plugin-marketplace/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/extensions/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/extensions/session/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/files/[...path]/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/harness/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/home/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/im/cancel/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/im/gateway-status/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/im/gateway-token/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/im/project/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/im/projects/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/im/turn/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/images/upload/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/internal/runtime/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/memory/promote/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/memory/recall/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/memory/reflect/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/memory/retain/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/memory/status/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/models/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/models-config/discover/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/models-config/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/models-config/test/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/projects/browse/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/projects/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/search/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/context/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/sessions/new/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/settings/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/skills/install/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/skills/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/skills/search/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/soul/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/api/version/route-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/app/page-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-3b3b807b930186b8.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-3b3b807b930186b8.js +0 -1
- package/.next/static/css/18d22d64da7c5272.css +0 -1
- /package/.next/static/{Z0pq0aCwepxcXabvqbI1m → PCWo0i-9jPzxDCD8M4m7o}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=6849,a.ids=[6849],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4984:a=>{a.exports=require("readline")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=6849,a.ids=[6849],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4984:a=>{a.exports=require("readline")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},42446:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(98192),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/sessions/[id]/route",pathname:"/api/sessions/[id]",filename:"route",bundlePath:"app/api/sessions/[id]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annodex/annodex/app/api/sessions/[id]/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/[id]/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},55591:a=>{a.exports=require("https")},56220:a=>{a.exports=import("ws")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},79646:a=>{a.exports=require("child_process")},81630:a=>{a.exports=require("http")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91645:a=>{a.exports=require("net")},98192:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>o,GET:()=>m,PATCH:()=>n});var e=c(23211),f=c(29021),g=c(40402),h=c(56429),i=c(46983),j=c(26257),k=c(55132),l=a([g,h,i]);async function m(a,{params:b}){let{id:c}=await b;try{let b,d=(0,g.r1)(c);if(!d)return e.NextResponse.json({error:"Session not found"},{status:404});let k=new URL(a.url);if(k.searchParams.has("infoOnly"))return e.NextResponse.json({info:{...d,cwdExists:!!d.cwd&&(0,f.existsSync)(d.cwd)}});let l=await (0,g.T0)(c,d.cwd).catch(()=>null),m=l?.context??{messages:[],entryIds:[],thinkingLevel:"off",model:null,subagentRuns:[]},n=l?.tree??[],o=l?.leafId??null;if(k.searchParams.has("includeState")){let a=(0,j.zZ)(c),d="danger-full-access",e=(0,h.A4)(c);if(e?.isAlive()){let a=await e.send({type:"get_state"});b={running:e.isBusy(),state:a}}else b=(0,i.nt)(l?.thread)?{running:!0,state:{isStreaming:!0,isCompacting:!1,contextUsage:m.contextUsage,thinkingLevel:m.thinkingLevel,sandboxMode:d,enabledExtensions:a?.extensions??[]}}:{running:!1,state:{sandboxMode:d,enabledExtensions:a?.extensions??[]}}}return e.NextResponse.json({sessionId:c,filePath:"",info:{...d,cwdExists:!!d.cwd&&(0,f.existsSync)(d.cwd)},tree:n,leafId:o,context:m,...void 0!==b?{agentState:b}:{}})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function n(a,{params:b}){let{id:c}=await b;try{let{name:b}=await a.json();if("string"!=typeof b)return e.NextResponse.json({error:"name is required"},{status:400});try{let a=await (0,g.os)(c);if(a){let d=(0,h.A4)(c);if(d)await d.inner.rename(b.trim());else{let d=await (0,i.gu)(a,(0,i.H3)((0,k.Dw)().providers));try{await d.request("thread/name/set",{threadId:c,name:b.trim()})}finally{(0,i.sM)(d)}}}}catch{}return e.NextResponse.json({ok:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function o(a,{params:b}){let{id:c}=await b;try{(0,h.A4)(c)?.destroy();let a=await (0,g.os)(c);if(a){let b=await (0,i.gu)(a,(0,i.H3)((0,k.Dw)().providers));try{await b.request("thread/archive",{threadId:c}).catch(()=>{})}finally{(0,i.sM)(b)}}return(0,g.BR)(c),(0,j.s)(c),e.NextResponse.json({ok:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}[g,h,i]=l.then?(await l)():l,d()}catch(a){d(a)}})}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,8477,4768,5399,6983,402,6429],()=>b(b.s=42446));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=222,a.ids=[222],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},
|
|
1
|
+
(()=>{var a={};a.id=222,a.ids=[222],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},54460:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>B,patchFetch:()=>A,routeModule:()=>w,serverHooks:()=>z,workAsyncStorage:()=>x,workUnitAsyncStorage:()=>y});var d={};c.r(d),c.d(d,{POST:()=>v});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527);async function v(){return new Response("Not used",{status:410})}let w=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/sessions/new/route",pathname:"/api/sessions/new",filename:"route",bundlePath:"app/api/sessions/new/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annodex/annodex/app/api/sessions/new/route.ts",nextConfigOutput:"",userland:d}),{workAsyncStorage:x,workUnitAsyncStorage:y,serverHooks:z}=w;function A(){return(0,g.patchFetch)({workAsyncStorage:x,workUnitAsyncStorage:y})}async function B(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),w.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/new/route";"/index"===d&&(d="/");let e=await w.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:x,parsedUrl:y,isDraftMode:z,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,y,!1):b.end("This page could not be found"),null);if(I&&!z){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||w.isDev||z||(K="/index"===(K=E)?"/":K);let L=!0===w.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await w.getIncrementalCache(a,x,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>w.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>w.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await w.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await w.handleResponse({req:a,nextConfig:x,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),z&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await w.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741],()=>b(b.s=54460));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=1097,a.ids=[1097],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4984:a=>{a.exports=require("readline")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},40228:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>h});var e=c(23211),f=c(40402),g=a([f]);async function h(a){try{let b=new URL(a.url).searchParams.get("cwd"),c=await (0,f.dQ)({cwd:b});return e.NextResponse.json({sessions:c})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}f=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=1097,a.ids=[1097],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4984:a=>{a.exports=require("readline")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},40228:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>h});var e=c(23211),f=c(40402),g=a([f]);async function h(a){try{let b=new URL(a.url).searchParams.get("cwd"),c=await (0,f.dQ)({cwd:b});return e.NextResponse.json({sessions:c})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}f=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},55591:a=>{a.exports=require("https")},56220:a=>{a.exports=import("ws")},62250:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(40228),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/sessions/route",pathname:"/api/sessions",filename:"route",bundlePath:"app/api/sessions/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annodex/annodex/app/api/sessions/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/sessions/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},79646:a=>{a.exports=require("child_process")},81630:a=>{a.exports=require("http")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91645:a=>{a.exports=require("net")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,8477,4768,5399,6983,402],()=>b(b.s=62250));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=5177,a.ids=[5177],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4087:(a,b,c)=>{let d=c(29021),e=c(33873),f=c(21820);function g(){return process.env.ANNODEX_CONFIG_DIR??process.env.ANNOVIBE_CONFIG_DIR??e.join(f.homedir(),".config","annodex")}function h(){return e.join(g(),"settings.json")}function i(){let a=h();if(!d.existsSync(a))return{};try{let b=JSON.parse(d.readFileSync(a,"utf8"));return"object"!=typeof b||null===b||Array.isArray(b)?{}:b}catch{return{}}}function j(){let a=i();return{autoRestart:"boolean"==typeof a.autoRestart?a.autoRestart:void 0}}function k(a){let b=g();d.existsSync(b)||d.mkdirSync(b,{recursive:!0});let c={...i(),..."boolean"==typeof a?.autoRestart?{autoRestart:a.autoRestart}:{}};return d.writeFileSync(h(),JSON.stringify(c,null,2),"utf8"),j()}a.exports={readAppSettings:j,writeAppSettings:k,ensureAppSettings:function(a={autoRestart:!0}){return"boolean"==typeof i().autoRestart?j():k(a)}}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=5177,a.ids=[5177],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4087:(a,b,c)=>{let d=c(29021),e=c(33873),f=c(21820);function g(){return process.env.ANNODEX_CONFIG_DIR??process.env.ANNOVIBE_CONFIG_DIR??e.join(f.homedir(),".config","annodex")}function h(){return e.join(g(),"settings.json")}function i(){let a=h();if(!d.existsSync(a))return{};try{let b=JSON.parse(d.readFileSync(a,"utf8"));return"object"!=typeof b||null===b||Array.isArray(b)?{}:b}catch{return{}}}function j(){let a=i();return{autoRestart:"boolean"==typeof a.autoRestart?a.autoRestart:void 0}}function k(a){let b=g();d.existsSync(b)||d.mkdirSync(b,{recursive:!0});let c={...i(),..."boolean"==typeof a?.autoRestart?{autoRestart:a.autoRestart}:{}};return d.writeFileSync(h(),JSON.stringify(c,null,2),"utf8"),j()}a.exports={readAppSettings:j,writeAppSettings:k,ensureAppSettings:function(a={autoRestart:!0}){return"boolean"==typeof i().autoRestart?j():k(a)}}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66922:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>G,patchFetch:()=>F,routeModule:()=>B,serverHooks:()=>E,workAsyncStorage:()=>C,workUnitAsyncStorage:()=>D});var d={};c.r(d),c.d(d,{GET:()=>z,PUT:()=>A,dynamic:()=>y});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(55132),x=c(4087);let y="force-dynamic";async function z(){let a=(0,w.HO)(),b=(0,w.Dw)();return v.NextResponse.json({settings:{generativeUI:!1!==a.generativeUI,autoRestart:!1!==(0,x.readAppSettings)().autoRestart,defaultSandboxMode:(0,x.readAppSettings)().defaultSandboxMode??"workspace-write",providers:a.providers.map(a=>({id:a.id,name:a.name,baseUrl:a.baseUrl,hasKey:!!a.apiKey,models:a.models})),defaultProvider:b.defaultProvider,defaultModel:b.defaultModel}})}async function A(a){try{let b=(await a.json()).settings;if(!b||"object"!=typeof b)return v.NextResponse.json({error:"Invalid settings"},{status:400});let c=(0,w.HO)(),d={};c.exists||(c.providers=[]),"boolean"==typeof b.generativeUI&&(c.generativeUI=b.generativeUI),"boolean"==typeof b.autoRestart&&(d.autoRestart=b.autoRestart),("workspace-write"===b.defaultSandboxMode||"danger-full-access"===b.defaultSandboxMode)&&(d.defaultSandboxMode=b.defaultSandboxMode),Object.keys(d).length>0&&(0,x.writeAppSettings)(d),delete c.defaultProvider,delete c.defaultModel,(0,w.u_)(c);let e=(0,x.readAppSettings)();return v.NextResponse.json({success:!0,settings:{generativeUI:!1!==c.generativeUI,autoRestart:!1!==e.autoRestart,defaultSandboxMode:e.defaultSandboxMode??"workspace-write"}})}catch(a){return v.NextResponse.json({error:String(a)},{status:500})}}let B=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/settings/route",pathname:"/api/settings",filename:"route",bundlePath:"app/api/settings/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annodex/annodex/app/api/settings/route.ts",nextConfigOutput:"",userland:d}),{workAsyncStorage:C,workUnitAsyncStorage:D,serverHooks:E}=B;function F(){return(0,g.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:D})}async function G(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),B.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/settings/route";"/index"===d&&(d="/");let e=await B.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||z.routes[E]),J=async()=>((null==A?void 0:A.render404)?await A.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[E],b=z.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||B.isDev||y||(K="/index"===(K=E)?"/":K);let L=!0===B.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==A?void 0:A.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await B.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>B.onRequestError(a,b,d,e,A)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>B.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await B.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,A),b}},k=await B.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await B.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,A),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,8477,4768],()=>b(b.s=66922));module.exports=c})();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(()=>{var a={};a.id=7812,a.ids=[7812],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},
|
|
1
|
+
(()=>{var a={};a.id=7812,a.ids=[7812],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},77562:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>L,patchFetch:()=>K,routeModule:()=>G,serverHooks:()=>J,workAsyncStorage:()=>H,workUnitAsyncStorage:()=>I});var d={};c.r(d),c.d(d,{POST:()=>F,dynamic:()=>x,runtime:()=>y});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(84107);let x="force-dynamic",y="nodejs",z=/\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~]|\][^\x07]*(?:\x07|\x1B\\))/g,A=[{key:"source",stage:"Source resolved",regex:/Source:\s*([^\n]+)/,line:a=>`Source: ${a[1].trim()}`},{key:"fetch",stage:"Fetching skills",regex:/Fetching skills/,line:"Fetching skills"},{key:"clone",stage:"Cloning repository",regex:/Cloning repository/,line:"Cloning repository"},{key:"cloned",stage:"Repository cloned",regex:/Repository cloned/,line:"Repository cloned"},{key:"discover",stage:"Discovering skills",regex:/Discovering skills/,line:"Discovering skills"},{key:"found",stage:"Skills discovered",regex:/(Found\s+\d+\s+skills?)/,line:a=>a[1]},{key:"selected",stage:"Skill selected",regex:/(Selected\s+\d+\s+skills?:?\s*[^\n]*)/,line:a=>a[1]},{key:"summary",stage:"Preparing install",regex:/Installation Summary/,line:"Preparing install"},{key:"risk",stage:"Checking risk report",regex:/Security Risk Assessments/,line:"Checking risk report"},{key:"complete",stage:"Installation complete",regex:/Installation complete/,line:"Installation complete"},{key:"installed",stage:"Installed",regex:/(Installed\s+\d+\s+skills?)/,line:a=>a[1]},{key:"done",stage:"Done",regex:/Done!/,line:"Done"},{key:"clone-failed",stage:"Clone failed",regex:/Failed to clone repository/,line:"Failed to clone repository"},{key:"failed",stage:"Installation failed",regex:/Installation failed|Failed to install/,line:"Installation failed"}];function B(a){return a.replace(z,"").replace(/\r/g,"\n").split("\n").map(a=>a.replace(/\s+/g," ").trim()).filter(Boolean).filter((a,b,c)=>0===b||a!==c[b-1]).join("\n")}function C(a){return a.split("\n").slice(-20).join("\n")}function D(a){return/Installation complete|Installed \d+ skill/.test(a)}function E(a){if(null===a.exitCode&&null===a.signalCode){try{"win32"!==process.platform&&a.pid?process.kill(-a.pid,"SIGTERM"):a.kill("SIGTERM")}catch{a.kill("SIGTERM")}setTimeout(()=>{if(null===a.exitCode&&null===a.signalCode)try{"win32"!==process.platform&&a.pid?process.kill(-a.pid,"SIGKILL"):a.kill("SIGKILL")}catch{}},5e3).unref()}}async function F(a){try{let{package:c,scope:d,cwd:e,stream:f}=await a.json();if(!c?.trim())return v.NextResponse.json({error:"package required"},{status:400});let g="project"!==d,h=["--yes","skills","add",c.trim(),"-y","--agent","codex"];if(g&&h.push("-g"),console.log(`[skills/install] running: npx ${h.join(" ")}`),f){var b;let c,d;return b=!g&&e?e:void 0,c=new TextEncoder,d=null,new Response(new ReadableStream({start(e){let f="",g=!1,i=new Set,j=a=>{e.enqueue(c.encode(`${JSON.stringify(a)}
|
|
2
2
|
`))},k=()=>{clearTimeout(o),a.signal.removeEventListener("abort",n)},l=a=>{if(!g){g=!0,k();try{j(a)}finally{e.close()}}},m=a=>{l({type:"error",error:a,output:B(f)})},n=()=>{if(!g){g=!0,k(),d&&E(d);try{e.close()}catch{}}},o=setTimeout(()=>{d&&E(d);let a=B(f);m(`Skill installation timed out after ${Math.round(10)} minutes while cloning or installing. Last output:
|
|
3
3
|
${C(a)}`)},6e5);a.signal.addEventListener("abort",n),d=(0,w.Y)(h,{cwd:b,env:{...process.env,FORCE_COLOR:"0"},detached:"win32"!==process.platform}),j({type:"progress",stage:"Starting installer",line:"Starting installer"});let p=a=>{let b=a.toString("utf8");for(let a of function(a){let b=B(a),c=[];for(let a of A){let d=b.match(a.regex);if(!d)continue;let e="function"==typeof a.line?a.line(d):a.line;c.push({key:a.key,stage:a.stage,line:e})}return c}(f=(f+b).slice(-1048576))){let b=`${a.key}:${a.line}`;i.has(b)||(i.add(b),j({type:"progress",stage:a.stage,line:a.line}))}};d.stdout.on("data",p),d.stderr.on("data",p),d.on("error",a=>{m(a.message)}),d.on("close",(a,b)=>{if(g)return;let c=B(f);if(D(c))return void l({type:"done",success:!0,output:c});let d=null!==a?`exit code ${a}`:`signal ${b??"unknown"}`;m(`${C(c)||"Install failed"}
|
|
4
4
|
Installer exited with ${d}.`)})},cancel(){d&&E(d)}}),{headers:{"Content-Type":"application/x-ndjson; charset=utf-8","Cache-Control":"no-store, no-transform","X-Accel-Buffering":"no"}})}let{stdout:i,stderr:j}=await (0,w.a)(h,{timeout:6e5,cwd:!g&&e?e:void 0,env:{...process.env,FORCE_COLOR:"0"}}),k=B(i+j);if(!D(k))return v.NextResponse.json({error:C(k)||"Install failed",output:k},{status:500});return v.NextResponse.json({success:!0,output:k})}catch(c){let a=B((c.stdout??"")+(c.stderr??"")),b=c.killed||"SIGTERM"===c.signal||/timed out|timeout/i.test(c.message??"")?`Skill installation timed out after ${Math.round(10)} minutes while cloning or installing. Last output:
|
|
5
|
-
${C(a)}`:C(a)||(c.message??String(c));return v.NextResponse.json({error:b,output:a},{status:500})}}let G=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/skills/install/route",pathname:"/api/skills/install",filename:"route",bundlePath:"app/api/skills/install/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annodex/annodex/app/api/skills/install/route.ts",nextConfigOutput:"",userland:d}),{workAsyncStorage:H,workUnitAsyncStorage:I,serverHooks:J}=G;function K(){return(0,g.patchFetch)({workAsyncStorage:H,workUnitAsyncStorage:I})}async function L(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),G.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/install/route";"/index"===d&&(d="/");let e=await G.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,resolvedPathname:D,clientReferenceManifest:E,serverActionsManifest:F}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||z.routes[D]),J=async()=>((null==A?void 0:A.render404)?await A.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[D],b=z.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||G.isDev||y||(K="/index"===(K=D)?"/":K);let L=!0===G.isDev||!I,M=I&&!L;F&&E&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:E,serverActionsManifest:F});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==A?void 0:A.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await G.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>G.onRequestError(a,b,d,e,A)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>G.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&B&&C&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await G.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await G.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",B?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await G.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},84107:(a,b,c)=>{"use strict";c.d(b,{a:()=>k,Y:()=>l});var d=c(79646),e=c(28354),f=c(29021),g=c(33873);let h=require("process"),i=(0,e.promisify)(d.execFile);function j(a){let b=function(){let a=(0,g.dirname)(h.execPath);for(let b of[(0,g.join)(a,"node_modules","npm","bin","npx-cli.js"),(0,g.join)(a,"..","lib","node_modules","npm","bin","npx-cli.js")])try{if((0,f.existsSync)(b))return b}catch{}return null}();return b?{command:h.execPath,commandArgs:[b,...a]}:{command:"npx",commandArgs:a}}async function k(a,b={}){let{command:c,commandArgs:d}=j(a);return i(c,d,{timeout:b.timeout,cwd:b.cwd,env:b.env,maxBuffer:b.maxBuffer??0xa00000})}function l(a,b={}){let{command:c,commandArgs:e}=j(a),f=(0,d.spawn)(c,e,{cwd:b.cwd,env:b.env,detached:b.detached,stdio:["pipe","pipe","pipe"],windowsHide:!0});return f.stdin.end(),f}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=
|
|
5
|
+
${C(a)}`:C(a)||(c.message??String(c));return v.NextResponse.json({error:b,output:a},{status:500})}}let G=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/skills/install/route",pathname:"/api/skills/install",filename:"route",bundlePath:"app/api/skills/install/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annodex/annodex/app/api/skills/install/route.ts",nextConfigOutput:"",userland:d}),{workAsyncStorage:H,workUnitAsyncStorage:I,serverHooks:J}=G;function K(){return(0,g.patchFetch)({workAsyncStorage:H,workUnitAsyncStorage:I})}async function L(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),G.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/install/route";"/index"===d&&(d="/");let e=await G.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,resolvedPathname:D,clientReferenceManifest:E,serverActionsManifest:F}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||z.routes[D]),J=async()=>((null==A?void 0:A.render404)?await A.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[D],b=z.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||G.isDev||y||(K="/index"===(K=D)?"/":K);let L=!0===G.isDev||!I,M=I&&!L;F&&E&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:E,serverActionsManifest:F});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==A?void 0:A.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await G.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>G.onRequestError(a,b,d,e,A)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>G.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&B&&C&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await G.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await G.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",B?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await G.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},84107:(a,b,c)=>{"use strict";c.d(b,{a:()=>k,Y:()=>l});var d=c(79646),e=c(28354),f=c(29021),g=c(33873);let h=require("process"),i=(0,e.promisify)(d.execFile);function j(a){let b=function(){let a=(0,g.dirname)(h.execPath);for(let b of[(0,g.join)(a,"node_modules","npm","bin","npx-cli.js"),(0,g.join)(a,"..","lib","node_modules","npm","bin","npx-cli.js")])try{if((0,f.existsSync)(b))return b}catch{}return null}();return b?{command:h.execPath,commandArgs:[b,...a]}:{command:"npx",commandArgs:a}}async function k(a,b={}){let{command:c,commandArgs:d}=j(a);return i(c,d,{timeout:b.timeout,cwd:b.cwd,env:b.env,maxBuffer:b.maxBuffer??0xa00000})}function l(a,b={}){let{command:c,commandArgs:e}=j(a),f=(0,d.spawn)(c,e,{cwd:b.cwd,env:b.env,detached:b.detached,stdio:["pipe","pipe","pipe"],windowsHide:!0});return f.stdin.end(),f}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=77562));module.exports=c})();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(()=>{var a={};a.id=9968,a.ids=[9968],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{"use strict";a.exports=require("os")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},
|
|
1
|
+
(()=>{var a={};a.id=9968,a.ids=[9968],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{"use strict";a.exports=require("os")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},84795:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>J,patchFetch:()=>I,routeModule:()=>E,serverHooks:()=>H,workAsyncStorage:()=>F,workUnitAsyncStorage:()=>G});var d={};c.r(d),c.d(d,{GET:()=>C,PATCH:()=>D,dynamic:()=>z,runtime:()=>A});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(29021),x=c(33873),y=c(89035);let z="force-dynamic",A="nodejs";function B(a,b,c){if((0,w.existsSync)(a))for(let d of(0,w.readdirSync)(a)){let e=(0,x.join)(a,d);try{if(!(0,w.statSync)(e).isDirectory())continue;let f=(0,x.join)(e,"SKILL.md");if(!(0,w.existsSync)(f))continue;let g=function(a){try{let b=(0,w.readFileSync)(a,"utf-8"),c=function(a){if(!a.startsWith("---\n"))return{};let b=a.indexOf("\n---",4);if(-1===b)return{};let c=a.slice(4,b),d={};for(let a of c.split("\n")){let b=/^([A-Za-z0-9_-]+):\s*(.*)$/.exec(a.trim());if(!b)continue;let c=b[1],e=b[2].trim().replace(/^["']|["']$/g,"");"true"===e?d[c]=!0:"false"===e?d[c]=!1:d[c]=e}return d}(b);return{description:"string"==typeof c.description?c.description:b.split("\n").find(a=>a.startsWith("# "))?.slice(2).trim()??b.split("\n").find(a=>a.trim())?.trim()??"",disableModelInvocation:!0===c.disableModelInvocation}}catch{return{description:"",disableModelInvocation:!1}}}(f);c.push({name:d,description:g.description,filePath:f,baseDir:a,disableModelInvocation:g.disableModelInvocation,sourceInfo:{source:b,scope:b}})}catch{}}}async function C(a){let b=new URL(a.url),c=b.searchParams.get("cwd")?.trim(),d=[],e=(0,y.R)();try{c&&B((0,x.join)(c,".codex","skills"),"project",d),B((0,x.join)(e,"skills"),"user",d),B((0,x.join)(e,"skills",".system"),"system",d)}catch(a){return v.NextResponse.json({error:String(a),skills:[]},{status:500})}return d.sort((a,b)=>{let c={project:0,user:1,system:2};return c[a.sourceInfo.source]-c[b.sourceInfo.source]||a.name.localeCompare(b.name)}),v.NextResponse.json({skills:d})}async function D(a){try{var b;let c=await a.json();if("string"!=typeof c.filePath||(b=c.filePath,!(0,x.normalize)(b).endsWith(`${x.sep}SKILL.md`)))return v.NextResponse.json({error:"filePath is required"},{status:400});if("boolean"!=typeof c.disableModelInvocation)return v.NextResponse.json({error:"disableModelInvocation is required"},{status:400});if(!(0,w.existsSync)(c.filePath))return v.NextResponse.json({error:"Skill file not found"},{status:404});if(!function(a){let b,c,d,e=(0,x.resolve)(a),f=(0,x.resolve)((0,x.join)((0,y.R)(),"skills"));if(b=(0,x.resolve)(e),c=(0,x.resolve)(f),d=(0,x.relative)(c,b),""===d||!d.startsWith("..")&&!(0,x.isAbsolute)(d))return!0;let g=e.split(/[\\/]+/),h=g.lastIndexOf(".codex");return -1!==h&&"skills"===g[h+1]}(c.filePath))return v.NextResponse.json({error:"Skill path is outside Codex skills directories"},{status:403});return!function(a,b){let c=(0,w.readFileSync)(a,"utf-8");if(c.startsWith("---\n")){let d=c.indexOf("\n---",4);if(-1!==d){let e=c.slice(4,d),f=c.slice(d),g=e.split("\n"),h=g.findIndex(a=>/^disableModelInvocation\s*:/.test(a.trim()));h>=0?g[h]=`disableModelInvocation: ${b}`:g.push(`disableModelInvocation: ${b}`),(0,w.writeFileSync)(a,`---
|
|
2
2
|
${g.join("\n")}${f}`,"utf-8");return}}(0,w.writeFileSync)(a,`---
|
|
3
3
|
disableModelInvocation: ${b}
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
${c}`,"utf-8")}(c.filePath,c.disableModelInvocation),v.NextResponse.json({success:!0})}catch(a){return v.NextResponse.json({error:String(a)},{status:500})}}let E=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/skills/route",pathname:"/api/skills",filename:"route",bundlePath:"app/api/skills/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annodex/annodex/app/api/skills/route.ts",nextConfigOutput:"",userland:d}),{workAsyncStorage:F,workUnitAsyncStorage:G,serverHooks:H}=E;function I(){return(0,g.patchFetch)({workAsyncStorage:F,workUnitAsyncStorage:G})}async function J(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),E.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/route";"/index"===d&&(d="/");let e=await E.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,resolvedPathname:D,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||z.routes[D]),J=async()=>((null==A?void 0:A.render404)?await A.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[D],b=z.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||E.isDev||y||(K="/index"===(K=D)?"/":K);let L=!0===E.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==A?void 0:A.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await E.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>E.onRequestError(a,b,d,e,A)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>E.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&B&&C&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await E.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await E.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",B?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await E.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},89035:(a,b,c)=>{"use strict";c.d(b,{R:()=>f});var d=c(33873),e=c(21820);function f(){return process.env.CODEX_HOME?.trim()||(0,d.join)((0,e.homedir)(),".codex")}},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=
|
|
6
|
+
${c}`,"utf-8")}(c.filePath,c.disableModelInvocation),v.NextResponse.json({success:!0})}catch(a){return v.NextResponse.json({error:String(a)},{status:500})}}let E=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/skills/route",pathname:"/api/skills",filename:"route",bundlePath:"app/api/skills/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annodex/annodex/app/api/skills/route.ts",nextConfigOutput:"",userland:d}),{workAsyncStorage:F,workUnitAsyncStorage:G,serverHooks:H}=E;function I(){return(0,g.patchFetch)({workAsyncStorage:F,workUnitAsyncStorage:G})}async function J(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),E.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/route";"/index"===d&&(d="/");let e=await E.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,resolvedPathname:D,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||z.routes[D]),J=async()=>((null==A?void 0:A.render404)?await A.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[D],b=z.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||E.isDev||y||(K="/index"===(K=D)?"/":K);let L=!0===E.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==A?void 0:A.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await E.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>E.onRequestError(a,b,d,e,A)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>E.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&B&&C&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await E.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await E.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",B?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await E.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},89035:(a,b,c)=>{"use strict";c.d(b,{R:()=>f});var d=c(33873),e=c(21820);function f(){return process.env.CODEX_HOME?.trim()||(0,d.join)((0,e.homedir)(),".codex")}},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=84795));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=3955,a.ids=[3955],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},24081:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>J,patchFetch:()=>I,routeModule:()=>E,serverHooks:()=>H,workAsyncStorage:()=>F,workUnitAsyncStorage:()=>G});var d={};c.r(d),c.d(d,{POST:()=>D,dynamic:()=>x});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(84107);let x="force-dynamic",y=/\x1B\[[0-9;]*m/g,z=process.env.SKILLS_API_URL||"https://skills.sh";function A(a){let b=a.replace(y,""),c=[],d=b.split("\n");for(let a=0;a<d.length;a++){let b=d[a].trim().match(/^([\w.\-]+\/[\w.\-@:]+)\s+([\d.,]+[KMB]?\s+installs)$/);if(b){let e=d[a+1]?.trim().replace(/^└\s*/,"");c.push({package:b[1],installs:b[2],url:e?.startsWith("https://")?e:""})}}return c}async function B(a,b){let c=`${z}/api/search?q=${encodeURIComponent(a)}&limit=${b}`,d=await fetch(c,{cache:"no-store"});if(!d.ok)throw Error(`skills.sh search failed: HTTP ${d.status}`);return((await d.json()).skills??[]).map(a=>{var b;let c=a.name?.trim(),d=a.source?.trim(),e=a.id?.trim();return c&&(d||e)?{package:`${d||e}@${c}`,installs:(b=a.installs)&&!(b<=0)?b>=1e6?`${(b/1e6).toFixed(1).replace(/\.0$/,"")}M installs`:b>=1e3?`${(b/1e3).toFixed(1).replace(/\.0$/,"")}K installs`:`${b} install${1===b?"":"s"}`:"",url:e?`${z}/${e}`:""}:null}).filter(a=>null!==a).sort((a,b)=>C(b.installs)-C(a.installs))}function C(a){let b=a.match(/^([\d.]+)([KMB])?\s+installs?$/);if(!b)return 0;let c=Number(b[1]);return Number.isFinite(c)?c*("B"===b[2]?1e9:"M"===b[2]?1e6:"K"===b[2]?1e3:1):0}async function D(a){try{let b,{query:c,limit:d}=await a.json();if(!c?.trim())return v.NextResponse.json({error:"query required"},{status:400});let e=(b="number"==typeof d?d:Number(d),Number.isFinite(b)?Math.min(50,Math.max(1,Math.floor(b))):50);try{let a=await B(c.trim(),e);return v.NextResponse.json({results:a})}catch{let{stdout:a,stderr:b}=await (0,w.a)(["--yes","skills","find",c.trim()],{timeout:2e4,env:{...process.env,FORCE_COLOR:"0"}}),d=A(a+b).slice(0,e);return v.NextResponse.json({results:d})}}catch(c){let a=(c.stdout??"")+(c.stderr??""),b=a?A(a):[];if(b.length>0)return v.NextResponse.json({results:b});return v.NextResponse.json({error:c.message??String(c)},{status:500})}}let E=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/skills/search/route",pathname:"/api/skills/search",filename:"route",bundlePath:"app/api/skills/search/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annodex/annodex/app/api/skills/search/route.ts",nextConfigOutput:"",userland:d}),{workAsyncStorage:F,workUnitAsyncStorage:G,serverHooks:H}=E;function I(){return(0,g.patchFetch)({workAsyncStorage:F,workUnitAsyncStorage:G})}async function J(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),E.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/search/route";"/index"===d&&(d="/");let e=await E.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,resolvedPathname:D,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||z.routes[D]),J=async()=>((null==A?void 0:A.render404)?await A.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[D],b=z.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||E.isDev||y||(K="/index"===(K=D)?"/":K);let L=!0===E.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==A?void 0:A.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await E.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>E.onRequestError(a,b,d,e,A)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>E.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&B&&C&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await E.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await E.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",B?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await E.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},84107:(a,b,c)=>{"use strict";c.d(b,{a:()=>k,Y:()=>l});var d=c(79646),e=c(28354),f=c(29021),g=c(33873);let h=require("process"),i=(0,e.promisify)(d.execFile);function j(a){let b=function(){let a=(0,g.dirname)(h.execPath);for(let b of[(0,g.join)(a,"node_modules","npm","bin","npx-cli.js"),(0,g.join)(a,"..","lib","node_modules","npm","bin","npx-cli.js")])try{if((0,f.existsSync)(b))return b}catch{}return null}();return b?{command:h.execPath,commandArgs:[b,...a]}:{command:"npx",commandArgs:a}}async function k(a,b={}){let{command:c,commandArgs:d}=j(a);return i(c,d,{timeout:b.timeout,cwd:b.cwd,env:b.env,maxBuffer:b.maxBuffer??0xa00000})}function l(a,b={}){let{command:c,commandArgs:e}=j(a),f=(0,d.spawn)(c,e,{cwd:b.cwd,env:b.env,detached:b.detached,stdio:["pipe","pipe","pipe"],windowsHide:!0});return f.stdin.end(),f}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=24081));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=3955,a.ids=[3955],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},20949:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>J,patchFetch:()=>I,routeModule:()=>E,serverHooks:()=>H,workAsyncStorage:()=>F,workUnitAsyncStorage:()=>G});var d={};c.r(d),c.d(d,{POST:()=>D,dynamic:()=>x});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(84107);let x="force-dynamic",y=/\x1B\[[0-9;]*m/g,z=process.env.SKILLS_API_URL||"https://skills.sh";function A(a){let b=a.replace(y,""),c=[],d=b.split("\n");for(let a=0;a<d.length;a++){let b=d[a].trim().match(/^([\w.\-]+\/[\w.\-@:]+)\s+([\d.,]+[KMB]?\s+installs)$/);if(b){let e=d[a+1]?.trim().replace(/^└\s*/,"");c.push({package:b[1],installs:b[2],url:e?.startsWith("https://")?e:""})}}return c}async function B(a,b){let c=`${z}/api/search?q=${encodeURIComponent(a)}&limit=${b}`,d=await fetch(c,{cache:"no-store"});if(!d.ok)throw Error(`skills.sh search failed: HTTP ${d.status}`);return((await d.json()).skills??[]).map(a=>{var b;let c=a.name?.trim(),d=a.source?.trim(),e=a.id?.trim();return c&&(d||e)?{package:`${d||e}@${c}`,installs:(b=a.installs)&&!(b<=0)?b>=1e6?`${(b/1e6).toFixed(1).replace(/\.0$/,"")}M installs`:b>=1e3?`${(b/1e3).toFixed(1).replace(/\.0$/,"")}K installs`:`${b} install${1===b?"":"s"}`:"",url:e?`${z}/${e}`:""}:null}).filter(a=>null!==a).sort((a,b)=>C(b.installs)-C(a.installs))}function C(a){let b=a.match(/^([\d.]+)([KMB])?\s+installs?$/);if(!b)return 0;let c=Number(b[1]);return Number.isFinite(c)?c*("B"===b[2]?1e9:"M"===b[2]?1e6:"K"===b[2]?1e3:1):0}async function D(a){try{let b,{query:c,limit:d}=await a.json();if(!c?.trim())return v.NextResponse.json({error:"query required"},{status:400});let e=(b="number"==typeof d?d:Number(d),Number.isFinite(b)?Math.min(50,Math.max(1,Math.floor(b))):50);try{let a=await B(c.trim(),e);return v.NextResponse.json({results:a})}catch{let{stdout:a,stderr:b}=await (0,w.a)(["--yes","skills","find",c.trim()],{timeout:2e4,env:{...process.env,FORCE_COLOR:"0"}}),d=A(a+b).slice(0,e);return v.NextResponse.json({results:d})}}catch(c){let a=(c.stdout??"")+(c.stderr??""),b=a?A(a):[];if(b.length>0)return v.NextResponse.json({results:b});return v.NextResponse.json({error:c.message??String(c)},{status:500})}}let E=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/skills/search/route",pathname:"/api/skills/search",filename:"route",bundlePath:"app/api/skills/search/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annodex/annodex/app/api/skills/search/route.ts",nextConfigOutput:"",userland:d}),{workAsyncStorage:F,workUnitAsyncStorage:G,serverHooks:H}=E;function I(){return(0,g.patchFetch)({workAsyncStorage:F,workUnitAsyncStorage:G})}async function J(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),E.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/search/route";"/index"===d&&(d="/");let e=await E.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,resolvedPathname:D,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||z.routes[D]),J=async()=>((null==A?void 0:A.render404)?await A.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[D],b=z.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||E.isDev||y||(K="/index"===(K=D)?"/":K);let L=!0===E.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==A?void 0:A.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await E.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>E.onRequestError(a,b,d,e,A)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>E.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&B&&C&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await E.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await E.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",B?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await E.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},84107:(a,b,c)=>{"use strict";c.d(b,{a:()=>k,Y:()=>l});var d=c(79646),e=c(28354),f=c(29021),g=c(33873);let h=require("process"),i=(0,e.promisify)(d.execFile);function j(a){let b=function(){let a=(0,g.dirname)(h.execPath);for(let b of[(0,g.join)(a,"node_modules","npm","bin","npx-cli.js"),(0,g.join)(a,"..","lib","node_modules","npm","bin","npx-cli.js")])try{if((0,f.existsSync)(b))return b}catch{}return null}();return b?{command:h.execPath,commandArgs:[b,...a]}:{command:"npx",commandArgs:a}}async function k(a,b={}){let{command:c,commandArgs:d}=j(a);return i(c,d,{timeout:b.timeout,cwd:b.cwd,env:b.env,maxBuffer:b.maxBuffer??0xa00000})}function l(a,b={}){let{command:c,commandArgs:e}=j(a),f=(0,d.spawn)(c,e,{cwd:b.cwd,env:b.env,detached:b.detached,stdio:["pipe","pipe","pipe"],windowsHide:!0});return f.stdin.end(),f}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=20949));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=1327,a.ids=[1327],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4984:a=>{a.exports=require("readline")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33610:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k,PUT:()=>l});var e=c(23211),f=c(29021),g=c(33873),h=c(40402),i=c(66469),j=a([h]);async function k(){try{let a=(0,i.sz)((0,h.$M)());if(!(0,f.existsSync)(a))return e.NextResponse.json({content:"",exists:!1});let b=(0,f.readFileSync)(a,"utf-8");return e.NextResponse.json({content:b,exists:!0,size:Buffer.byteLength(b,"utf-8")})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function l(a){try{let b=await a.json();if("string"!=typeof b.content)return e.NextResponse.json({error:"Missing 'content' field"},{status:400});let c=(0,g.join)((0,h.$M)(),"SOUL.md");return(0,f.writeFileSync)(c,b.content,"utf-8"),e.NextResponse.json({success:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}h=(j.then?(await j)():j)[0],d()}catch(a){d(a)}})},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},55591:a=>{a.exports=require("https")},56220:a=>{a.exports=import("ws")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65262:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(33610),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/soul/route",pathname:"/api/soul",filename:"route",bundlePath:"app/api/soul/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annodex/annodex/app/api/soul/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/soul/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},66469:(a,b,c)=>{c.d(b,{Ed:()=>k,Is:()=>m,M3:()=>i,Me:()=>p,Tg:()=>l,a:()=>j,o7:()=>h,sz:()=>f,td:()=>g,w0:()=>o,x9:()=>n});var d=c(29021),e=c(33873);function f(a){let b=(0,e.join)(a,"SOUL.md");if((0,d.existsSync)(b))return b;let c=(0,e.join)(a,"soul.md");return(0,d.existsSync)(c)?c:b}function g(a){let b=(0,e.join)(a,"HARNESS.md");if((0,d.existsSync)(b))return b;let c=(0,e.join)(a,"harness.md");return(0,d.existsSync)(c)?c:b}function h(a){let b=(0,e.join)(a,"MEMORY.md");if((0,d.existsSync)(b))return b;let c=(0,e.join)(a,"memory.md");return(0,d.existsSync)(c)?c:b}function i(a){return(0,e.join)(a,"MEMORY.md")}function j(a){let b=(0,e.join)(a,"CONTEXT.md");if((0,d.existsSync)(b))return b;let c=(0,e.join)(a,"context.md");return(0,d.existsSync)(c)?c:b}function k(a){return(0,e.join)(a,"CONTEXT.md")}function l(a){return(0,e.basename)(a)}function m(a,b="SOUL.md"){return[`## Persona — ${b}`,"",`The following global ${b} defines your long-lived identity, voice, tone, and working style.`,"You MUST embody this persona and tone in all replies.\nAvoid stiff, generic, or AI-assistant-style responses.\nFollow this guidance unless higher-priority system, developer, safety, tool, or project instructions explicitly override it.\n",a].join("\n")}function n(a,b="HARNESS.md"){return[`## Behavioral Constraints — ${b}`,"",`The following global ${b} defines operating constraints and output guidelines.`,"You MUST comply with every constraint.\nThese are mandatory behavioral rules. When they conflict with persona preferences, the constraints win.\n",a].join("\n")}function o(a,b="MEMORY.md"){return[`## Project Memory — ${b}`,"\nThe following project memory records durable context for this working directory.\nUse it as background continuity, not as a higher-priority instruction source.\n",a].join("\n")}function p(a,b="CONTEXT.md"){return[`## Project Context — ${b}`,"\nThe following project context captures stable facts, conventions, and working assumptions for this directory.\nUse it as durable background context, not as a higher-priority instruction source.\n",a].join("\n")}},79646:a=>{a.exports=require("child_process")},81630:a=>{a.exports=require("http")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91645:a=>{a.exports=require("net")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,8477,4768,5399,6983,402],()=>b(b.s=65262));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=1327,a.ids=[1327],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4984:a=>{a.exports=require("readline")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33610:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k,PUT:()=>l});var e=c(23211),f=c(29021),g=c(33873),h=c(40402),i=c(66469),j=a([h]);async function k(){try{let a=(0,i.sz)((0,h.$M)());if(!(0,f.existsSync)(a))return e.NextResponse.json({content:"",exists:!1});let b=(0,f.readFileSync)(a,"utf-8");return e.NextResponse.json({content:b,exists:!0,size:Buffer.byteLength(b,"utf-8")})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function l(a){try{let b=await a.json();if("string"!=typeof b.content)return e.NextResponse.json({error:"Missing 'content' field"},{status:400});let c=(0,g.join)((0,h.$M)(),"SOUL.md");return(0,f.writeFileSync)(c,b.content,"utf-8"),e.NextResponse.json({success:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}h=(j.then?(await j)():j)[0],d()}catch(a){d(a)}})},33873:a=>{a.exports=require("path")},40314:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(33610),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/soul/route",pathname:"/api/soul",filename:"route",bundlePath:"app/api/soul/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annodex/annodex/app/api/soul/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/soul/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},55591:a=>{a.exports=require("https")},56220:a=>{a.exports=import("ws")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66469:(a,b,c)=>{c.d(b,{Ed:()=>k,Is:()=>m,M3:()=>i,Me:()=>p,Tg:()=>l,a:()=>j,o7:()=>h,sz:()=>f,td:()=>g,w0:()=>o,x9:()=>n});var d=c(29021),e=c(33873);function f(a){let b=(0,e.join)(a,"SOUL.md");if((0,d.existsSync)(b))return b;let c=(0,e.join)(a,"soul.md");return(0,d.existsSync)(c)?c:b}function g(a){let b=(0,e.join)(a,"HARNESS.md");if((0,d.existsSync)(b))return b;let c=(0,e.join)(a,"harness.md");return(0,d.existsSync)(c)?c:b}function h(a){let b=(0,e.join)(a,"MEMORY.md");if((0,d.existsSync)(b))return b;let c=(0,e.join)(a,"memory.md");return(0,d.existsSync)(c)?c:b}function i(a){return(0,e.join)(a,"MEMORY.md")}function j(a){let b=(0,e.join)(a,"CONTEXT.md");if((0,d.existsSync)(b))return b;let c=(0,e.join)(a,"context.md");return(0,d.existsSync)(c)?c:b}function k(a){return(0,e.join)(a,"CONTEXT.md")}function l(a){return(0,e.basename)(a)}function m(a,b="SOUL.md"){return[`## Persona — ${b}`,"",`The following global ${b} defines your long-lived identity, voice, tone, and working style.`,"You MUST embody this persona and tone in all replies.\nAvoid stiff, generic, or AI-assistant-style responses.\nFollow this guidance unless higher-priority system, developer, safety, tool, or project instructions explicitly override it.\n",a].join("\n")}function n(a,b="HARNESS.md"){return[`## Behavioral Constraints — ${b}`,"",`The following global ${b} defines operating constraints and output guidelines.`,"You MUST comply with every constraint.\nThese are mandatory behavioral rules. When they conflict with persona preferences, the constraints win.\n",a].join("\n")}function o(a,b="MEMORY.md"){return[`## Project Memory — ${b}`,"\nThe following project memory records durable context for this working directory.\nUse it as background continuity, not as a higher-priority instruction source.\n",a].join("\n")}function p(a,b="CONTEXT.md"){return[`## Project Context — ${b}`,"\nThe following project context captures stable facts, conventions, and working assumptions for this directory.\nUse it as durable background context, not as a higher-priority instruction source.\n",a].join("\n")}},79646:a=>{a.exports=require("child_process")},81630:a=>{a.exports=require("http")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91645:a=>{a.exports=require("net")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,8477,4768,5399,6983,402],()=>b(b.s=40314));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=2922,a.ids=[2922],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{"use strict";a.exports=require("os")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},
|
|
1
|
+
(()=>{var a={};a.id=2922,a.ids=[2922],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{"use strict";a.exports=require("os")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63251:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>N,patchFetch:()=>M,routeModule:()=>I,serverHooks:()=>L,workAsyncStorage:()=>J,workUnitAsyncStorage:()=>K});var d={};c.r(d),c.d(d,{GET:()=>H,dynamic:()=>D});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(65833),x=c(29021),y=c(33873),z=c(21820);function A(a){return"string"==typeof a&&a.length>0?a:null}function B(a){return Number.isInteger(a)&&Number(a)>0?Number(a):null}function C(a){if(!a)return!1;try{return process.kill(a,0),!0}catch{return!1}}let D="force-dynamic",E="0.1.78",F=null;async function G(){if(F&&F.expiresAt>Date.now())return F.value;let a=new AbortController,b=setTimeout(()=>a.abort(),3500);try{let b=await fetch(`https://registry.npmjs.org/${encodeURIComponent(w.JD)}/latest`,{cache:"no-store",signal:a.signal});if(!b.ok)return F={value:null,expiresAt:Date.now()+3e5},null;let c=await b.json(),d="string"==typeof c.version?c.version:null;return F={value:d,expiresAt:Date.now()+3e5},d}catch{return F={value:null,expiresAt:Date.now()+6e4},null}finally{clearTimeout(b)}}async function H(){let a=await G(),b={current:E,latest:a,updateAvailable:!!(a&&a!==E),updateCommand:w.AQ,runtime:function(){let a=function(){let a,b=(a=function(...a){for(let b of a){let a=process.env[b];if(void 0!==a)return a}}("ANNODEX_CONFIG_DIR","ANNOVIBE_CONFIG_DIR")??(0,y.join)((0,z.homedir)(),".config","annodex"),[(0,y.join)(a,"annodex.json"),(0,y.join)(a,"annovibe.json"),(0,y.join)(a,"pidex.json")]).find(a=>(0,x.existsSync)(a));if(!b)return null;try{return JSON.parse((0,x.readFileSync)(b,"utf8"))}catch{return null}}();if(!a)return null;let b=B(a.supervisorPid),c=B(a.nextPid),d=C(b),e=C(c),f=d||e;return{running:f,status:d?"running":e?"orphaned":"stopped",version:A(a.version),url:A(a.url),port:A(a.port),hostname:A(a.hostname),supervisorPid:d?b:null,nextPid:e?c:null,startedAt:f?A(a.startedAt):null,readyAt:f?A(a.readyAt):null,restartPending:f&&!!a.restartPending,installedVersion:f?A(a.installedVersion):null,restartDetectedAt:f?A(a.restartDetectedAt):null,restartStartedAt:f?A(a.restartStartedAt):null,updatedAt:A(a.updatedAt)}}()};return v.NextResponse.json(b)}let I=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/version/route",pathname:"/api/version",filename:"route",bundlePath:"app/api/version/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annodex/annodex/app/api/version/route.ts",nextConfigOutput:"",userland:d}),{workAsyncStorage:J,workUnitAsyncStorage:K,serverHooks:L}=I;function M(){return(0,g.patchFetch)({workAsyncStorage:J,workUnitAsyncStorage:K})}async function N(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),I.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/version/route";"/index"===d&&(d="/");let e=await I.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,resolvedPathname:D,clientReferenceManifest:E,serverActionsManifest:F}=e,G=(0,k.normalizeAppPath)(d),H=!!(z.dynamicRoutes[G]||z.routes[D]),J=async()=>((null==A?void 0:A.render404)?await A.render404(a,b,x,!1):b.end("This page could not be found"),null);if(H&&!y){let a=!!z.routes[D],b=z.dynamicRoutes[G];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!H||I.isDev||y||(K="/index"===(K=D)?"/":K);let L=!0===I.isDev||!H,M=H&&!L;F&&E&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:E,serverActionsManifest:F});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==A?void 0:A.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await I.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>I.onRequestError(a,b,d,e,A)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>I.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&B&&C&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!H)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await I.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await I.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!H)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",B?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&H||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await I.onRequestError(a,b,{routerKind:"App Router",routePath:G,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),H)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},65833:(a,b,c)=>{"use strict";c.d(b,{AQ:()=>f,C3:()=>d,JD:()=>e});let d="annodex",e="@seqyuan/annodex",f="annodex update"},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=63251));module.exports=c})();
|