wiki-viewer 1.7.1 → 1.8.0
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/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +7 -0
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +32 -3
- package/.next/standalone/.next/routes-manifest.json +46 -0
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +2 -2
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/agent/activity/route.js +6 -6
- package/.next/standalone/.next/server/app/api/agent/activity/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/admin/agents/[agentId]/revoke/route.js +6 -6
- package/.next/standalone/.next/server/app/api/agent/admin/agents/[agentId]/revoke/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/admin/agents/route.js +6 -6
- package/.next/standalone/.next/server/app/api/agent/admin/agents/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/admin/registrations/[regId]/approve/route.js +7 -7
- package/.next/standalone/.next/server/app/api/agent/admin/registrations/[regId]/approve/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/admin/registrations/[regId]/deny/route.js +5 -5
- package/.next/standalone/.next/server/app/api/agent/admin/registrations/[regId]/deny/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/admin/registrations/route.js +5 -5
- package/.next/standalone/.next/server/app/api/agent/admin/registrations/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/events/[...path]/route.js +8 -7
- package/.next/standalone/.next/server/app/api/agent/events/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/files/[...path]/route.js +9 -8
- package/.next/standalone/.next/server/app/api/agent/files/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/file/[...path]/route.js +8 -7
- package/.next/standalone/.next/server/app/api/agent/fs/file/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/ls/[[...path]]/route.js +7 -7
- package/.next/standalone/.next/server/app/api/agent/fs/ls/[[...path]]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/move/route.js +6 -5
- package/.next/standalone/.next/server/app/api/agent/fs/move/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/search/route.js +7 -6
- package/.next/standalone/.next/server/app/api/agent/fs/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/internal/span/route.js +6 -5
- package/.next/standalone/.next/server/app/api/agent/internal/span/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/settings/route.js +7 -7
- package/.next/standalone/.next/server/app/api/agent/settings/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/sidecar/[...path]/route.js +8 -7
- package/.next/standalone/.next/server/app/api/agent/sidecar/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/app-proxy/[...path]/route.js +2 -2
- package/.next/standalone/.next/server/app/api/app-proxy/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/assets/[...path]/route.js +8 -2
- package/.next/standalone/.next/server/app/api/assets/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/[...all]/route.js +5 -5
- package/.next/standalone/.next/server/app/api/auth/[...all]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/admins/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/system/admins/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/system/admins/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/system/admins/route.js +14 -0
- package/.next/standalone/.next/server/app/api/system/admins/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/system/admins/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/system/admins/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/system/auth-config/route.js +6 -6
- package/.next/standalone/.next/server/app/api/system/auth-config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/auth-settings/route.js +4 -4
- package/.next/standalone/.next/server/app/api/system/auth-settings/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/browse/route.js +4 -4
- package/.next/standalone/.next/server/app/api/system/browse/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/clear-root/route.js +5 -5
- package/.next/standalone/.next/server/app/api/system/clear-root/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/config/route.js +6 -6
- package/.next/standalone/.next/server/app/api/system/config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/pins/route.js +4 -4
- package/.next/standalone/.next/server/app/api/system/pins/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/reveal/route.js +6 -6
- package/.next/standalone/.next/server/app/api/system/reveal/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/root-status/route.js +5 -5
- package/.next/standalone/.next/server/app/api/system/root-status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/set-root/route.js +6 -6
- package/.next/standalone/.next/server/app/api/system/set-root/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/users/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/system/users/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/system/users/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/system/users/route.js +14 -0
- package/.next/standalone/.next/server/app/api/system/users/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/system/users/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/system/users/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/open/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/open/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/open/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/open/route.js +14 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/open/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/open/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/open/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/route.js +14 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/route.js +14 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/upload/[...path]/route.js +8 -2
- package/.next/standalone/.next/server/app/api/upload/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/app/route.js +5 -5
- package/.next/standalone/.next/server/app/api/wiki/app/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/content/route.js +6 -6
- package/.next/standalone/.next/server/app/api/wiki/content/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/download/route.js +7 -7
- package/.next/standalone/.next/server/app/api/wiki/download/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/file/route.js +8 -2
- package/.next/standalone/.next/server/app/api/wiki/file/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/folder/route.js +6 -6
- package/.next/standalone/.next/server/app/api/wiki/folder/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/move/route.js +6 -6
- package/.next/standalone/.next/server/app/api/wiki/move/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/new-file/route.js +7 -7
- package/.next/standalone/.next/server/app/api/wiki/new-file/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/page/route.js +7 -7
- package/.next/standalone/.next/server/app/api/wiki/page/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/presence/route.js +7 -7
- package/.next/standalone/.next/server/app/api/wiki/presence/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/route.js +6 -6
- package/.next/standalone/.next/server/app/api/wiki/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/search/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/wiki/search/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/wiki/search/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/wiki/search/route.js +15 -0
- package/.next/standalone/.next/server/app/api/wiki/search/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/wiki/search/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/wiki/search/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/wiki/slugs/route.js +6 -6
- package/.next/standalone/.next/server/app/api/wiki/slugs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/upload/route.js +7 -7
- package/.next/standalone/.next/server/app/api/wiki/upload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/watch/route.js +7 -9
- package/.next/standalone/.next/server/app/api/wiki/watch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +5 -5
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/manifest.webmanifest/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/manifest.webmanifest/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/manifest.webmanifest/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/manifest.webmanifest/route.js +9 -0
- package/.next/standalone/.next/server/app/manifest.webmanifest/route.js.map +5 -0
- package/.next/standalone/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/manifest.webmanifest.body +1 -0
- package/.next/standalone/.next/server/app/manifest.webmanifest.meta +1 -0
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/signin/page.js +1 -1
- package/.next/standalone/.next/server/app/signin/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/signin/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +7 -0
- package/.next/standalone/.next/server/chunks/0p91_next_dist_1195ub1._.js +18 -0
- package/.next/standalone/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_0d2jbo5.js +1 -1
- package/.next/standalone/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_0ytral2.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0-244bv._.js +16 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0xz-_0v._.js → [root-of-the-server]__0-inabx._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0-ao6a_._.js → [root-of-the-server]__0.-9jt0._.js} +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0~-r-8f._.js → [root-of-the-server]__00c1-dr._.js} +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__00lep-u._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__00mtevo._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__00qu86p._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__012753j._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01hp8ax._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0jhr.ex._.js → [root-of-the-server]__02n6z97._.js} +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__036mhjp._.js +5 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__03p0ob1._.js +16 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05t~v6l._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__068ni_k._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__06yp.08._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__082nhm6._.js → [root-of-the-server]__07vphbd._.js} +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0pg6dn-._.js → [root-of-the-server]__08lkuwa._.js} +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__09cqzem._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0p_ox-k._.js → [root-of-the-server]__09k4q9e._.js} +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_0_601._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ae3dk6._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0s28.4-._.js → [root-of-the-server]__0af-x45._.js} +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0cqu-wm._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d75a5q._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d7x3e1._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d7zxm_._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0e7vs98._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0fxzg4v._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0gda_iu._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0hu~q20._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0jk1uf4._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0l-8clq._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0lhka0x._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0kdn1le._.js → [root-of-the-server]__0na11h0._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0nd.b_c._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0otb8ra._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0p0-p__._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0piofm3._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0rrf-jr._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0s6_lzw._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0sh13v5._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ta~flu._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0v4im4p._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0qn8e~s._.js → [root-of-the-server]__0v_kyp-._.js} +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0vatqe-._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0vdb2nr._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0wdh63w._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0z3wg9x._.js +12 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0mzo03s._.js → [root-of-the-server]__0~.-3yk._.js} +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__123._fe._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__12800b1._.js → [root-of-the-server]__12ee_s6._.js} +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__12onytt._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__04udrya._.js → [root-of-the-server]__12q8ch8._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1377.79._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1378-ox._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__13aid91._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__13hp4tw._.js +12 -0
- package/.next/standalone/.next/server/chunks/_079xuln._.js +1 -1
- package/.next/standalone/.next/server/chunks/_0dr1r1g._.js +452 -0
- package/.next/standalone/.next/server/chunks/_101exke._.js +452 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_system_admins_route_actions_0dsm7cx.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_system_users_route_actions_0whj5cy.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_system_workspaces_[id]_open_route_actions_1087xu7.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_system_workspaces_[id]_route_actions_0~h7-8s.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_system_workspaces_route_actions_0mkalc3.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_search_route_actions_0inxu93.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_manifest_webmanifest_route_actions_04wfv0d.js +3 -0
- package/.next/standalone/.next/server/chunks/node_modules__pnpm_0aj5g-w._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_search_0d-_j3u._.js +46 -0
- package/.next/standalone/.next/server/chunks/src_lib_search_0ymmp0c._.js +46 -0
- package/.next/standalone/.next/server/chunks/ssr/0p91_next_dist_esm_build_templates_app-page_042apsk.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/0p91_next_dist_esm_build_templates_app-page_08q3u1e.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/0p91_next_dist_esm_build_templates_app-page_0nflz3~.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/0p91_next_dist_esm_build_templates_app-page_0p5k29e.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{0~w0_katex_dist_katex_mjs_0b8ra51._.js → 0~w0_katex_dist_katex_mjs_04mhawr._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_erDiagram-TEJ5UH35_mjs_0v6rnqy._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_mermaid_core_mjs_0hj_n-~._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0btcd4o._.js → [root-of-the-server]__02twzph._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ytvlzs._.js → [root-of-the-server]__09~x2v~._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0hvvps3._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0pqaawz._.js +18 -18
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0c71i8a._.js → node_modules__pnpm_0.96tmo._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0lm8e2c._.js → node_modules__pnpm_011vy_q._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0ezm2us._.js → node_modules__pnpm_01o_5qt._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0j3mvgg._.js → node_modules__pnpm_04n0h6.._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0~ln0by._.js → node_modules__pnpm_093dp2q._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_11e~j49._.js → node_modules__pnpm_09ej62_._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0de8xt-._.js → node_modules__pnpm_09ljbdz._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0-x6zex._.js → node_modules__pnpm_09~_ob2._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0yq5z.h._.js → node_modules__pnpm_0a01ng7._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0kwc-vs._.js → node_modules__pnpm_0b8qx0g._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0hrbz84._.js → node_modules__pnpm_0bbc---._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0hobcbs._.js → node_modules__pnpm_0c.309.._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0rw91-f._.js → node_modules__pnpm_0c8aunj._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0o.c1z8._.js → node_modules__pnpm_0hk6xys._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0dboa_e._.js → node_modules__pnpm_0hlzy8f._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0j53hti._.js → node_modules__pnpm_0nw5ou2._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0xrmzh1._.js → node_modules__pnpm_0o.dn8o._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0cxwhfd._.js → node_modules__pnpm_0s0ur~d._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_07rxv2x._.js → node_modules__pnpm_0shlang._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0i.pw_m._.js → node_modules__pnpm_0sq3c2r._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0ajzar9._.js → node_modules__pnpm_0t9jb7d._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_012nt.s._.js → node_modules__pnpm_0wmx9kq._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0z~h2ow._.js → node_modules__pnpm_0xfx0sf._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0cbsnwf._.js → node_modules__pnpm_0yiz.-t._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0bum3-3._.js → node_modules__pnpm_11sut1u._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0mdo4i3._.js → node_modules__pnpm_124u4o2._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0il8j.j._.js → node_modules__pnpm_13tajgx._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/src_app_signin_00yk0vm._.js +2 -2
- package/.next/standalone/.next/server/edge/chunks/{08yl_next_dist_esm_build_templates_edge-wrapper_0o9h3w_.js → 08yl_next_dist_esm_build_templates_edge-wrapper_0xbpts6.js} +2 -2
- package/.next/standalone/.next/server/edge/chunks/[root-of-the-server]__0.pmgt2._.js +3 -0
- package/.next/standalone/.next/server/functions-config-manifest.json +6 -0
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/middleware-manifest.json +8 -8
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/0c_~zevf2n0r4.css +2 -0
- package/.next/standalone/.next/static/chunks/0l4842ez-0_66.js +129 -0
- package/.next/standalone/README.md +46 -2
- package/.next/standalone/docs/workspacing-plan.md +364 -0
- package/.next/standalone/package.json +2 -2
- package/.next/standalone/packages/wiki-viewer-mcp/package.json +1 -1
- package/.next/standalone/public/icon-192.png +0 -0
- package/.next/standalone/public/icon-512.png +0 -0
- package/.next/standalone/public/icon-maskable-512.png +0 -0
- package/.next/standalone/src/app/api/agent/activity/route.ts +9 -8
- package/.next/standalone/src/app/api/agent/events/[...path]/route.ts +20 -8
- package/.next/standalone/src/app/api/agent/files/[...path]/route.ts +16 -9
- package/.next/standalone/src/app/api/agent/fs/file/[...path]/route.ts +28 -18
- package/.next/standalone/src/app/api/agent/fs/ls/[[...path]]/route.ts +12 -7
- package/.next/standalone/src/app/api/agent/fs/move/route.ts +16 -11
- package/.next/standalone/src/app/api/agent/fs/search/route.ts +49 -13
- package/.next/standalone/src/app/api/agent/internal/span/route.ts +9 -5
- package/.next/standalone/src/app/api/agent/register/route.ts +9 -1
- package/.next/standalone/src/app/api/agent/settings/route.ts +7 -3
- package/.next/standalone/src/app/api/agent/sidecar/[...path]/route.ts +8 -4
- package/.next/standalone/src/app/api/assets/[...path]/route.ts +9 -4
- package/.next/standalone/src/app/api/system/admins/route.ts +103 -0
- package/.next/standalone/src/app/api/system/reveal/route.ts +7 -6
- package/.next/standalone/src/app/api/system/set-root/route.ts +24 -1
- package/.next/standalone/src/app/api/system/users/route.ts +120 -0
- package/.next/standalone/src/app/api/system/workspaces/[id]/open/route.ts +34 -0
- package/.next/standalone/src/app/api/system/workspaces/[id]/route.ts +74 -0
- package/.next/standalone/src/app/api/system/workspaces/route.ts +67 -0
- package/.next/standalone/src/app/api/upload/[...path]/route.ts +10 -5
- package/.next/standalone/src/app/api/wiki/app/route.ts +10 -9
- package/.next/standalone/src/app/api/wiki/content/route.ts +14 -14
- package/.next/standalone/src/app/api/wiki/download/route.ts +7 -6
- package/.next/standalone/src/app/api/wiki/file/route.ts +7 -2
- package/.next/standalone/src/app/api/wiki/folder/route.ts +6 -5
- package/.next/standalone/src/app/api/wiki/move/route.ts +7 -7
- package/.next/standalone/src/app/api/wiki/new-file/route.ts +7 -6
- package/.next/standalone/src/app/api/wiki/page/route.ts +6 -5
- package/.next/standalone/src/app/api/wiki/presence/route.ts +8 -7
- package/.next/standalone/src/app/api/wiki/route.ts +13 -11
- package/.next/standalone/src/app/api/wiki/search/route.ts +44 -0
- package/.next/standalone/src/app/api/wiki/slugs/route.ts +8 -8
- package/.next/standalone/src/app/api/wiki/upload/route.ts +6 -5
- package/.next/standalone/src/app/api/wiki/watch/route.ts +16 -40
- package/.next/standalone/src/app/globals.css +484 -484
- package/.next/standalone/src/app/layout.tsx +15 -1
- package/.next/standalone/src/app/manifest.ts +30 -0
- package/.next/standalone/src/app/page.tsx +163 -49
- package/.next/standalone/src/components/auth-settings-sheet.tsx +171 -2
- package/.next/standalone/src/components/dir-picker.tsx +8 -6
- package/.next/standalone/src/components/editor/comment-thread.tsx +2 -1
- package/.next/standalone/src/components/editor/csv-viewer.tsx +3 -2
- package/.next/standalone/src/components/editor/editor-toolbar.tsx +2 -2
- package/.next/standalone/src/components/editor/editor.tsx +6 -5
- package/.next/standalone/src/components/editor/file-fallback-viewer.tsx +3 -2
- package/.next/standalone/src/components/editor/folder-index.tsx +2 -1
- package/.next/standalone/src/components/editor/image-viewer.tsx +2 -1
- package/.next/standalone/src/components/editor/media-popover.tsx +2 -1
- package/.next/standalone/src/components/editor/media-viewer.tsx +2 -1
- package/.next/standalone/src/components/editor/mermaid-viewer.tsx +3 -2
- package/.next/standalone/src/components/editor/node-app-viewer.tsx +4 -3
- package/.next/standalone/src/components/editor/notebook-viewer.tsx +3 -2
- package/.next/standalone/src/components/editor/office/docx-viewer.tsx +2 -1
- package/.next/standalone/src/components/editor/office/office-chrome.tsx +3 -2
- package/.next/standalone/src/components/editor/office/pptx-viewer.tsx +2 -1
- package/.next/standalone/src/components/editor/office/xlsx-viewer.tsx +2 -1
- package/.next/standalone/src/components/editor/pdf-viewer.tsx +2 -1
- package/.next/standalone/src/components/editor/proof-span-popover.tsx +2 -1
- package/.next/standalone/src/components/editor/source-viewer.tsx +3 -2
- package/.next/standalone/src/components/editor/suggest-edit-popover.tsx +2 -1
- package/.next/standalone/src/components/editor/suggestion-card.tsx +2 -1
- package/.next/standalone/src/components/editor/website-viewer.tsx +2 -1
- package/.next/standalone/src/components/editor/wiki-link-create-dialog.tsx +2 -1
- package/.next/standalone/src/components/search/search-command-dialog.tsx +109 -0
- package/.next/standalone/src/components/search/sidebar-search-box.tsx +121 -0
- package/.next/standalone/src/components/search/snippet-text.tsx +48 -0
- package/.next/standalone/src/components/ui/command.tsx +3 -2
- package/.next/standalone/src/lib/auth/admin.ts +112 -0
- package/.next/standalone/src/lib/auth/server.ts +13 -2
- package/.next/standalone/src/lib/config.ts +56 -4
- package/.next/standalone/src/lib/proof/audit.ts +19 -10
- package/.next/standalone/src/lib/proof/auth.ts +11 -0
- package/.next/standalone/src/lib/proof/collab-state.ts +4 -2
- package/.next/standalone/src/lib/proof/file-lock.ts +5 -0
- package/.next/standalone/src/lib/proof/idempotency.ts +5 -0
- package/.next/standalone/src/lib/proof/lease.ts +40 -27
- package/.next/standalone/src/lib/proof/mutex.ts +4 -0
- package/.next/standalone/src/lib/proof/raw-fs.ts +2 -3
- package/.next/standalone/src/lib/proof/registry.ts +5 -0
- package/.next/standalone/src/lib/search/indexable-exts.ts +25 -0
- package/.next/standalone/src/lib/search/indexer.ts +567 -0
- package/.next/standalone/src/lib/search/sanitize.ts +35 -0
- package/.next/standalone/src/lib/search/search-db.ts +57 -0
- package/.next/standalone/src/lib/search/watcher-pool.ts +79 -0
- package/.next/standalone/src/lib/workspace-client.ts +82 -0
- package/.next/standalone/src/lib/workspace-context.ts +142 -0
- package/.next/standalone/src/lib/workspaces.ts +196 -0
- package/.next/standalone/src/stores/ai-panel-store.ts +3 -2
- package/.next/standalone/src/stores/editor-store.ts +4 -3
- package/.next/standalone/src/stores/proof-store.ts +4 -3
- package/.next/standalone/src/stores/search-store.ts +86 -0
- package/.next/standalone/src/stores/wiki-slugs-store.ts +2 -1
- package/.next/standalone/src/tests/proof/admin-create-user.test.ts +43 -0
- package/.next/standalone/src/tests/proof/agent-workspace-scope.test.ts +134 -0
- package/.next/standalone/src/tests/proof/collab-state.test.ts +43 -41
- package/.next/standalone/src/tests/proof/preload.ts +21 -0
- package/.next/standalone/src/tests/proof/search-index.test.ts +339 -0
- package/.next/standalone/src/tests/proof/workspace-isolation.test.ts +87 -0
- package/.next/standalone/src/tests/proof/workspaces-api.test.ts +227 -0
- package/.next/standalone/tsconfig.tsbuildinfo +1 -1
- package/README.md +46 -2
- package/package.json +2 -2
- package/.next/standalone/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_0o~h4zq.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.hb9q2._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.uux34._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0092hkp._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05f6x0i._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05idwm9._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__06-dtd0._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__06sek6_._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__07fpqks._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__094q5bj._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0awzyon._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d_da6q._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0hhhvm7._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0kk26wc._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0km8suj._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0kur4ro._.js +0 -15
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0mkwoul._.js +0 -12
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qc2~6l._.js +0 -15
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qyd-o8._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0rkve~v._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0rzo40z._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0sjocwy._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ssj9~d._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0s~i040._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t220d-._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t5mg.n._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0trsqf4._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xq124z._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__106uw_c._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__10w2q~o._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__13w-0iy._.js +0 -3
- package/.next/standalone/.next/server/chunks/src_lib_auth_server_ts_00f4e0h._.js +0 -452
- package/.next/standalone/.next/server/edge/chunks/[root-of-the-server]__0ug2rvl._.js +0 -3
- package/.next/standalone/.next/static/chunks/0vwkqw_rofm-c.js +0 -129
- package/.next/standalone/.next/static/chunks/0zay6349~v_wc.css +0 -2
- /package/.next/standalone/.next/static/{H0E5wVJm9tAuN5CrU6zG2 → t7B6nXaoD1jo9f61t3aeK}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{H0E5wVJm9tAuN5CrU6zG2 → t7B6nXaoD1jo9f61t3aeK}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{H0E5wVJm9tAuN5CrU6zG2 → t7B6nXaoD1jo9f61t3aeK}/_ssgManifest.js +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { readFile, stat } from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { NextResponse } from "next/server";
|
|
4
|
-
import {
|
|
4
|
+
import { resolveWorkspaceForAgent } from "@/lib/workspace-context";
|
|
5
|
+
import { safeWorkspacePath } from "@/lib/workspaces";
|
|
5
6
|
|
|
6
7
|
const MIME_MAP: Record<string, string> = {
|
|
7
8
|
jpg: "image/jpeg",
|
|
@@ -28,9 +29,13 @@ const MIME_MAP: Record<string, string> = {
|
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
export async function GET(request: Request) {
|
|
32
|
+
const wsx = await resolveWorkspaceForAgent(request);
|
|
33
|
+
if (!wsx.ok) return NextResponse.json({ error: wsx.code }, { status: wsx.status });
|
|
34
|
+
const { rootDir } = wsx;
|
|
35
|
+
|
|
31
36
|
const { searchParams } = new URL(request.url);
|
|
32
37
|
const rel = searchParams.get("path") ?? "";
|
|
33
|
-
const filePath =
|
|
38
|
+
const filePath = safeWorkspacePath(rootDir, rel);
|
|
34
39
|
if (!filePath)
|
|
35
40
|
return NextResponse.json({ error: "Invalid path" }, { status: 400 });
|
|
36
41
|
try {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { mkdir } from "node:fs/promises";
|
|
2
2
|
import { NextResponse } from "next/server";
|
|
3
3
|
import { checkOrigin } from "@/lib/auth/csrf";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { resolveWorkspaceForUser } from "@/lib/workspace-context";
|
|
5
|
+
import { safeWorkspacePath } from "@/lib/workspaces";
|
|
6
6
|
|
|
7
7
|
export async function POST(request: Request) {
|
|
8
8
|
const csrf = checkOrigin(request);
|
|
9
9
|
if (csrf) return csrf;
|
|
10
|
-
const
|
|
11
|
-
if (!
|
|
10
|
+
const ctx = await resolveWorkspaceForUser(request);
|
|
11
|
+
if (!ctx.ok) return NextResponse.json({ error: ctx.code }, { status: ctx.status });
|
|
12
|
+
const { rootDir } = ctx;
|
|
12
13
|
|
|
13
14
|
const body: { path?: string } = await request.json();
|
|
14
15
|
const rel = body.path;
|
|
@@ -17,7 +18,7 @@ export async function POST(request: Request) {
|
|
|
17
18
|
return NextResponse.json({ error: "Invalid folder path" }, { status: 400 });
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
const folderPath =
|
|
21
|
+
const folderPath = safeWorkspacePath(rootDir, rel);
|
|
21
22
|
if (!folderPath)
|
|
22
23
|
return NextResponse.json({ error: "Invalid path" }, { status: 400 });
|
|
23
24
|
|
|
@@ -2,15 +2,16 @@ import { rename, stat } from "node:fs/promises";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { NextResponse } from "next/server";
|
|
4
4
|
import { checkOrigin } from "@/lib/auth/csrf";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { resolveWorkspaceForUser } from "@/lib/workspace-context";
|
|
6
|
+
import { safeWorkspacePath } from "@/lib/workspaces";
|
|
7
7
|
import { moveSidecar } from "@/lib/proof/sidecar";
|
|
8
8
|
|
|
9
9
|
export async function POST(request: Request) {
|
|
10
10
|
const csrf = checkOrigin(request);
|
|
11
11
|
if (csrf) return csrf;
|
|
12
|
-
const
|
|
13
|
-
if (!
|
|
12
|
+
const ctx = await resolveWorkspaceForUser(request);
|
|
13
|
+
if (!ctx.ok) return NextResponse.json({ error: ctx.code }, { status: ctx.status });
|
|
14
|
+
const { rootDir } = ctx;
|
|
14
15
|
|
|
15
16
|
const body: { from?: string; to?: string } = await request.json();
|
|
16
17
|
if (
|
|
@@ -25,8 +26,8 @@ export async function POST(request: Request) {
|
|
|
25
26
|
);
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
const fromPath =
|
|
29
|
-
const toPath =
|
|
29
|
+
const fromPath = safeWorkspacePath(rootDir, body.from);
|
|
30
|
+
const toPath = safeWorkspacePath(rootDir, body.to);
|
|
30
31
|
|
|
31
32
|
if (!fromPath || !toPath)
|
|
32
33
|
return NextResponse.json({ error: "Invalid path" }, { status: 400 });
|
|
@@ -50,7 +51,6 @@ export async function POST(request: Request) {
|
|
|
50
51
|
// Fix latent bug: sidecar was orphaned on .md renames (R3)
|
|
51
52
|
const fromExt = path.extname(body.from).toLowerCase();
|
|
52
53
|
if (fromExt === ".md" || fromExt === ".markdown") {
|
|
53
|
-
const rootDir = getRootDir();
|
|
54
54
|
await moveSidecar(rootDir, body.from, body.to);
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -2,15 +2,16 @@ import { mkdir, stat, writeFile } from "node:fs/promises";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { NextResponse } from "next/server";
|
|
4
4
|
import { checkOrigin } from "@/lib/auth/csrf";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { resolveWorkspaceForUser } from "@/lib/workspace-context";
|
|
6
|
+
import { safeWorkspacePath } from "@/lib/workspaces";
|
|
7
7
|
|
|
8
8
|
export async function POST(request: Request) {
|
|
9
9
|
const csrf = checkOrigin(request);
|
|
10
10
|
if (csrf) return csrf;
|
|
11
|
-
const
|
|
12
|
-
if (!
|
|
13
|
-
return NextResponse.json({ error:
|
|
11
|
+
const ctx = await resolveWorkspaceForUser(request);
|
|
12
|
+
if (!ctx.ok)
|
|
13
|
+
return NextResponse.json({ error: ctx.code }, { status: ctx.status });
|
|
14
|
+
const { rootDir } = ctx;
|
|
14
15
|
|
|
15
16
|
const body: { path?: string } = await request.json();
|
|
16
17
|
const rel = body.path;
|
|
@@ -22,7 +23,7 @@ export async function POST(request: Request) {
|
|
|
22
23
|
return NextResponse.json({ error: "Invalid file path" }, { status: 400 });
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
const filePath =
|
|
26
|
+
const filePath = safeWorkspacePath(rootDir, rel);
|
|
26
27
|
if (!filePath)
|
|
27
28
|
return NextResponse.json({ error: "Invalid path" }, { status: 400 });
|
|
28
29
|
|
|
@@ -2,8 +2,8 @@ import { mkdir, stat, writeFile } from "node:fs/promises";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { NextResponse } from "next/server";
|
|
4
4
|
import { checkOrigin } from "@/lib/auth/csrf";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { resolveWorkspaceForUser } from "@/lib/workspace-context";
|
|
6
|
+
import { safeWorkspacePath } from "@/lib/workspaces";
|
|
7
7
|
|
|
8
8
|
const VALID_DIRS = new Set(["entities", "concepts", "comparisons"]);
|
|
9
9
|
const SLUG_RE = /^[a-z0-9-]+$/;
|
|
@@ -37,8 +37,9 @@ function singularType(
|
|
|
37
37
|
export async function POST(request: Request) {
|
|
38
38
|
const csrf = checkOrigin(request);
|
|
39
39
|
if (csrf) return csrf;
|
|
40
|
-
const
|
|
41
|
-
if (!
|
|
40
|
+
const ctx = await resolveWorkspaceForUser(request);
|
|
41
|
+
if (!ctx.ok) return NextResponse.json({ error: ctx.code }, { status: ctx.status });
|
|
42
|
+
const { rootDir } = ctx;
|
|
42
43
|
|
|
43
44
|
const body: PageBody = await request.json();
|
|
44
45
|
const { dir, slug } = body;
|
|
@@ -51,7 +52,7 @@ export async function POST(request: Request) {
|
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
const relPath = `${dir}/${slug}.md`;
|
|
54
|
-
const filePath =
|
|
55
|
+
const filePath = safeWorkspacePath(rootDir, relPath);
|
|
55
56
|
if (!filePath)
|
|
56
57
|
return NextResponse.json({ error: "Invalid path" }, { status: 400 });
|
|
57
58
|
|
|
@@ -12,17 +12,18 @@
|
|
|
12
12
|
export const runtime = "nodejs";
|
|
13
13
|
|
|
14
14
|
import { NextResponse } from "next/server";
|
|
15
|
-
import {
|
|
15
|
+
import { resolveWorkspaceForUser } from "@/lib/workspace-context";
|
|
16
|
+
import { safeWorkspacePath } from "@/lib/workspaces";
|
|
16
17
|
import { setLease, clearLease } from "@/lib/proof/lease";
|
|
17
|
-
import { safeRootPath } from "@/lib/root-dir";
|
|
18
18
|
|
|
19
19
|
function errJson(code: string, message: string, status: number): NextResponse {
|
|
20
20
|
return NextResponse.json({ error: code, message }, { status });
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export async function POST(req: Request): Promise<NextResponse> {
|
|
24
|
-
const
|
|
25
|
-
if (!
|
|
24
|
+
const ctx = await resolveWorkspaceForUser(req);
|
|
25
|
+
if (!ctx.ok) return errJson(ctx.code, "Not authenticated", ctx.status);
|
|
26
|
+
const { rootDir } = ctx;
|
|
26
27
|
|
|
27
28
|
let body: { path?: unknown; action?: unknown };
|
|
28
29
|
try {
|
|
@@ -40,15 +41,15 @@ export async function POST(req: Request): Promise<NextResponse> {
|
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
// Basic traversal guard
|
|
43
|
-
if (!
|
|
44
|
+
if (!safeWorkspacePath(rootDir, relPath)) {
|
|
44
45
|
return errJson("INVALID_PATH", "Path traversal rejected", 400);
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
if (action === "open" || action === "heartbeat") {
|
|
48
|
-
setLease(relPath,
|
|
49
|
+
setLease(rootDir, relPath, ctx.userId);
|
|
49
50
|
} else {
|
|
50
51
|
// close
|
|
51
|
-
clearLease(relPath,
|
|
52
|
+
clearLease(rootDir, relPath, ctx.userId);
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
return NextResponse.json({ ok: true });
|
|
@@ -2,18 +2,19 @@ import { readdir, rmdir, stat, unlink } from "node:fs/promises";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { NextResponse } from "next/server";
|
|
4
4
|
import { checkOrigin } from "@/lib/auth/csrf";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { resolveWorkspaceForUser } from "@/lib/workspace-context";
|
|
6
|
+
import { safeWorkspacePath } from "@/lib/workspaces";
|
|
7
7
|
import { isAppFolder, isNodeApp } from "@/lib/wiki-helpers";
|
|
8
8
|
|
|
9
9
|
export async function GET(request: Request) {
|
|
10
|
-
const
|
|
11
|
-
if (!
|
|
10
|
+
const ctx = await resolveWorkspaceForUser(request);
|
|
11
|
+
if (!ctx.ok) return NextResponse.json({ error: ctx.code }, { status: ctx.status });
|
|
12
|
+
const { rootDir } = ctx;
|
|
12
13
|
|
|
13
14
|
const { searchParams } = new URL(request.url);
|
|
14
15
|
const dir = searchParams.get("dir") ?? "";
|
|
15
16
|
|
|
16
|
-
const targetDir =
|
|
17
|
+
const targetDir = safeWorkspacePath(rootDir, dir);
|
|
17
18
|
if (!targetDir)
|
|
18
19
|
return NextResponse.json({ error: "Invalid path" }, { status: 400 });
|
|
19
20
|
|
|
@@ -31,7 +32,7 @@ export async function GET(request: Request) {
|
|
|
31
32
|
const info = await stat(filePath);
|
|
32
33
|
if (info.isDirectory()) {
|
|
33
34
|
const relPath = dir ? `${dir}/${name}` : name;
|
|
34
|
-
const nodeApp = await isNodeApp(
|
|
35
|
+
const nodeApp = await isNodeApp(rootDir, relPath);
|
|
35
36
|
if (nodeApp) {
|
|
36
37
|
return {
|
|
37
38
|
name,
|
|
@@ -39,7 +40,7 @@ export async function GET(request: Request) {
|
|
|
39
40
|
modifiedAt: info.mtime.toISOString(),
|
|
40
41
|
};
|
|
41
42
|
}
|
|
42
|
-
const isApp = await isAppFolder(
|
|
43
|
+
const isApp = await isAppFolder(rootDir, relPath);
|
|
43
44
|
return {
|
|
44
45
|
name,
|
|
45
46
|
type: (isApp ? "app" : "dir") as "app" | "dir",
|
|
@@ -74,16 +75,17 @@ export async function GET(request: Request) {
|
|
|
74
75
|
export async function DELETE(request: Request) {
|
|
75
76
|
const csrf = checkOrigin(request);
|
|
76
77
|
if (csrf) return csrf;
|
|
77
|
-
const
|
|
78
|
-
if (!
|
|
78
|
+
const ctx = await resolveWorkspaceForUser(request);
|
|
79
|
+
if (!ctx.ok) return NextResponse.json({ error: ctx.code }, { status: ctx.status });
|
|
80
|
+
const { rootDir } = ctx;
|
|
79
81
|
|
|
80
82
|
const body: { path?: string } = await request.json();
|
|
81
83
|
const rel = body.path;
|
|
82
84
|
if (!rel || typeof rel !== "string")
|
|
83
85
|
return NextResponse.json({ error: "Invalid path" }, { status: 400 });
|
|
84
86
|
|
|
85
|
-
const filePath =
|
|
86
|
-
if (!filePath || filePath ===
|
|
87
|
+
const filePath = safeWorkspacePath(rootDir, rel);
|
|
88
|
+
if (!filePath || filePath === rootDir)
|
|
87
89
|
return NextResponse.json({ error: "Invalid path" }, { status: 400 });
|
|
88
90
|
|
|
89
91
|
try {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export const runtime = "nodejs";
|
|
2
|
+
|
|
3
|
+
import { NextResponse } from "next/server";
|
|
4
|
+
import { checkOrigin } from "@/lib/auth/csrf";
|
|
5
|
+
import { resolveWorkspaceForUser } from "@/lib/workspace-context";
|
|
6
|
+
import { ensureIndexer, ftsSearch } from "@/lib/search/indexer";
|
|
7
|
+
|
|
8
|
+
const HARD_LIMIT = 200;
|
|
9
|
+
|
|
10
|
+
export async function POST(request: Request) {
|
|
11
|
+
const csrf = checkOrigin(request);
|
|
12
|
+
if (csrf) return csrf;
|
|
13
|
+
|
|
14
|
+
const ctx = await resolveWorkspaceForUser(request);
|
|
15
|
+
if (!ctx.ok) return NextResponse.json({ error: ctx.code }, { status: ctx.status });
|
|
16
|
+
|
|
17
|
+
let body: { query?: unknown; limit?: unknown };
|
|
18
|
+
try {
|
|
19
|
+
body = (await request.json()) as typeof body;
|
|
20
|
+
} catch {
|
|
21
|
+
return NextResponse.json({ error: "INVALID_PAYLOAD" }, { status: 400 });
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const query = typeof body.query === "string" ? body.query : "";
|
|
25
|
+
const limit = Math.min(
|
|
26
|
+
typeof body.limit === "number" ? body.limit : 30,
|
|
27
|
+
HARD_LIMIT,
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
// Lazy init: fire-and-forget. Returns results from whatever is already indexed;
|
|
31
|
+
// index warms up in background on first call per workspace.
|
|
32
|
+
ensureIndexer(ctx.ws.id, ctx.rootDir).catch((e) =>
|
|
33
|
+
console.error("[search] ensureIndexer failed", e),
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
const result = ftsSearch(ctx.ws.id, query, limit);
|
|
37
|
+
|
|
38
|
+
return NextResponse.json({
|
|
39
|
+
kind: "fts",
|
|
40
|
+
query,
|
|
41
|
+
matches: result.matches,
|
|
42
|
+
truncated: result.truncated,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { readdir } from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { NextResponse } from "next/server";
|
|
4
|
-
import {
|
|
5
|
-
import { getRootDir } from "@/lib/root-dir";
|
|
4
|
+
import { resolveWorkspaceForUser } from "@/lib/workspace-context";
|
|
6
5
|
|
|
7
6
|
type SlugBuckets = {
|
|
8
7
|
entities: string[];
|
|
@@ -28,17 +27,18 @@ async function readMarkdownSlugsFromDir(dirPath: string): Promise<string[]> {
|
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
export async function GET(request: Request) {
|
|
31
|
-
const
|
|
32
|
-
if (!
|
|
30
|
+
const ctx = await resolveWorkspaceForUser(request);
|
|
31
|
+
if (!ctx.ok) return NextResponse.json({ error: ctx.code }, { status: ctx.status });
|
|
32
|
+
const { rootDir } = ctx;
|
|
33
33
|
|
|
34
34
|
try {
|
|
35
35
|
// Scan root + known dirs (entities, concepts, comparisons for wiki compat)
|
|
36
36
|
// plus any other immediate subdirectories
|
|
37
37
|
const [entities, concepts, comparisons, root] = await Promise.all([
|
|
38
|
-
readMarkdownSlugsFromDir(path.join(
|
|
39
|
-
readMarkdownSlugsFromDir(path.join(
|
|
40
|
-
readMarkdownSlugsFromDir(path.join(
|
|
41
|
-
readMarkdownSlugsFromDir(
|
|
38
|
+
readMarkdownSlugsFromDir(path.join(rootDir, "entities")),
|
|
39
|
+
readMarkdownSlugsFromDir(path.join(rootDir, "concepts")),
|
|
40
|
+
readMarkdownSlugsFromDir(path.join(rootDir, "comparisons")),
|
|
41
|
+
readMarkdownSlugsFromDir(rootDir),
|
|
42
42
|
]);
|
|
43
43
|
|
|
44
44
|
const body: SlugBuckets = { entities, concepts, comparisons, root };
|
|
@@ -2,8 +2,8 @@ import { mkdir, writeFile } from "node:fs/promises";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { NextResponse } from "next/server";
|
|
4
4
|
import { checkOrigin } from "@/lib/auth/csrf";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { resolveWorkspaceForUser } from "@/lib/workspace-context";
|
|
6
|
+
import { safeWorkspacePath } from "@/lib/workspaces";
|
|
7
7
|
|
|
8
8
|
const ALLOWED_MIME_TYPES = new Set([
|
|
9
9
|
"application/pdf",
|
|
@@ -39,8 +39,9 @@ function sanitizeFilename(name: string): string {
|
|
|
39
39
|
export async function POST(request: Request) {
|
|
40
40
|
const csrf = checkOrigin(request);
|
|
41
41
|
if (csrf) return csrf;
|
|
42
|
-
const
|
|
43
|
-
if (!
|
|
42
|
+
const ctx = await resolveWorkspaceForUser(request);
|
|
43
|
+
if (!ctx.ok) return NextResponse.json({ error: ctx.code }, { status: ctx.status });
|
|
44
|
+
const { rootDir } = ctx;
|
|
44
45
|
|
|
45
46
|
let formData: FormData;
|
|
46
47
|
try {
|
|
@@ -54,7 +55,7 @@ export async function POST(request: Request) {
|
|
|
54
55
|
return NextResponse.json({ error: "No file provided" }, { status: 400 });
|
|
55
56
|
|
|
56
57
|
const dir = (formData.get("dir") as string) ?? "";
|
|
57
|
-
const targetDir =
|
|
58
|
+
const targetDir = safeWorkspacePath(rootDir, dir);
|
|
58
59
|
if (!targetDir)
|
|
59
60
|
return NextResponse.json({ error: "Invalid directory" }, { status: 400 });
|
|
60
61
|
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
export const runtime = "nodejs";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { requireUser } from "@/lib/auth/server";
|
|
7
|
-
import { getRootDir } from "@/lib/root-dir";
|
|
3
|
+
import { resolveWorkspaceForUser } from "@/lib/workspace-context";
|
|
4
|
+
import { subscribe } from "@/lib/search/watcher-pool";
|
|
5
|
+
import { ensureIndexer } from "@/lib/search/indexer";
|
|
8
6
|
|
|
9
7
|
export async function GET(request: Request) {
|
|
10
|
-
const
|
|
11
|
-
if (!
|
|
8
|
+
const ctx = await resolveWorkspaceForUser(request);
|
|
9
|
+
if (!ctx.ok) return new Response(ctx.code, { status: ctx.status });
|
|
10
|
+
const { ws, rootDir } = ctx;
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
// Fire-and-forget: brings the indexer up on first SSE connection per workspace.
|
|
13
|
+
ensureIndexer(ws.id, rootDir).catch((e) =>
|
|
14
|
+
console.error("[search] ensureIndexer failed", e),
|
|
15
|
+
);
|
|
17
16
|
|
|
18
17
|
const encoder = new TextEncoder();
|
|
19
|
-
|
|
20
|
-
let watcher: any = null;
|
|
18
|
+
let unsubscribe: (() => void) | null = null;
|
|
21
19
|
let heartbeatId: ReturnType<typeof setInterval> | null = null;
|
|
22
20
|
let controllerRef: ReadableStreamDefaultController | null = null;
|
|
23
21
|
|
|
@@ -36,34 +34,12 @@ export async function GET(request: Request) {
|
|
|
36
34
|
start(controller) {
|
|
37
35
|
controllerRef = controller;
|
|
38
36
|
|
|
39
|
-
watcher
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
persistent: true,
|
|
43
|
-
awaitWriteFinish: { stabilityThreshold: 150, pollInterval: 50 },
|
|
37
|
+
// Subscribe via the shared pool -- no second watcher is created.
|
|
38
|
+
unsubscribe = subscribe(ws.id, rootDir, (type, relPath) => {
|
|
39
|
+
send({ type, path: relPath });
|
|
44
40
|
});
|
|
45
41
|
|
|
46
|
-
|
|
47
|
-
return path.relative(rootDir, absPath);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
watcher.on("add", (p: string) => send({ type: "add", path: relPath(p) }));
|
|
51
|
-
watcher.on("unlink", (p: string) =>
|
|
52
|
-
send({ type: "unlink", path: relPath(p) }),
|
|
53
|
-
);
|
|
54
|
-
watcher.on("addDir", (p: string) => {
|
|
55
|
-
const rel = relPath(p);
|
|
56
|
-
if (rel) send({ type: "addDir", path: rel }); // skip root itself
|
|
57
|
-
});
|
|
58
|
-
watcher.on("unlinkDir", (p: string) => {
|
|
59
|
-
const rel = relPath(p);
|
|
60
|
-
if (rel) send({ type: "unlinkDir", path: rel });
|
|
61
|
-
});
|
|
62
|
-
watcher.on("change", (p: string) =>
|
|
63
|
-
send({ type: "change", path: relPath(p) }),
|
|
64
|
-
);
|
|
65
|
-
|
|
66
|
-
// Heartbeat keeps the connection alive through proxies / load balancers
|
|
42
|
+
// Heartbeat keeps the connection alive through proxies / load balancers.
|
|
67
43
|
heartbeatId = setInterval(() => {
|
|
68
44
|
try {
|
|
69
45
|
controller.enqueue(encoder.encode(": heartbeat\n\n"));
|
|
@@ -76,7 +52,7 @@ export async function GET(request: Request) {
|
|
|
76
52
|
cancel() {
|
|
77
53
|
controllerRef = null;
|
|
78
54
|
if (heartbeatId !== null) clearInterval(heartbeatId);
|
|
79
|
-
|
|
55
|
+
unsubscribe?.();
|
|
80
56
|
},
|
|
81
57
|
});
|
|
82
58
|
|