wiki-viewer 1.4.2 → 1.5.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.
Files changed (280) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +5 -0
  3. package/.next/standalone/.next/build-manifest.json +3 -3
  4. package/.next/standalone/.next/prerender-manifest.json +3 -27
  5. package/.next/standalone/.next/routes-manifest.json +34 -0
  6. package/.next/standalone/.next/server/app/_global-error/page.js +2 -2
  7. package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  14. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/.next/standalone/.next/server/app/_not-found/page.js +4 -4
  16. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  17. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  18. package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
  19. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  20. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  21. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  22. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  23. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  24. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  25. package/.next/standalone/.next/server/app/api/agent/activity/route.js +5 -5
  26. package/.next/standalone/.next/server/app/api/agent/activity/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/agent/admin/agents/[agentId]/revoke/route.js +6 -6
  28. package/.next/standalone/.next/server/app/api/agent/admin/agents/[agentId]/revoke/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/agent/admin/agents/route.js +6 -6
  30. package/.next/standalone/.next/server/app/api/agent/admin/agents/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/agent/admin/registrations/[regId]/approve/route.js +6 -6
  32. package/.next/standalone/.next/server/app/api/agent/admin/registrations/[regId]/approve/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/agent/admin/registrations/[regId]/deny/route.js +4 -4
  34. package/.next/standalone/.next/server/app/api/agent/admin/registrations/[regId]/deny/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/agent/admin/registrations/route.js +4 -4
  36. package/.next/standalone/.next/server/app/api/agent/admin/registrations/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/agent/events/[...path]/route.js +5 -5
  38. package/.next/standalone/.next/server/app/api/agent/events/[...path]/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/agent/files/[...path]/route.js +11 -10
  40. package/.next/standalone/.next/server/app/api/agent/files/[...path]/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/api/agent/fs/file/[...path]/route/app-paths-manifest.json +3 -0
  42. package/.next/standalone/.next/server/app/api/agent/fs/file/[...path]/route/build-manifest.json +9 -0
  43. package/.next/standalone/.next/server/app/api/agent/fs/file/[...path]/route/server-reference-manifest.json +4 -0
  44. package/.next/standalone/.next/server/app/api/agent/fs/file/[...path]/route.js +17 -0
  45. package/.next/standalone/.next/server/app/api/agent/fs/file/[...path]/route.js.map +5 -0
  46. package/.next/standalone/.next/server/app/api/agent/fs/file/[...path]/route.js.nft.json +1 -0
  47. package/.next/standalone/.next/server/app/api/agent/fs/file/[...path]/route_client-reference-manifest.js +3 -0
  48. package/.next/standalone/.next/server/app/api/agent/fs/ls/[[...path]]/route/app-paths-manifest.json +3 -0
  49. package/.next/standalone/.next/server/app/api/agent/fs/ls/[[...path]]/route/build-manifest.json +9 -0
  50. package/.next/standalone/.next/server/app/api/agent/fs/ls/[[...path]]/route/server-reference-manifest.json +4 -0
  51. package/.next/standalone/.next/server/app/api/agent/fs/ls/[[...path]]/route.js +15 -0
  52. package/.next/standalone/.next/server/app/api/agent/fs/ls/[[...path]]/route.js.map +5 -0
  53. package/.next/standalone/.next/server/app/api/agent/fs/ls/[[...path]]/route.js.nft.json +1 -0
  54. package/.next/standalone/.next/server/app/api/agent/fs/ls/[[...path]]/route_client-reference-manifest.js +3 -0
  55. package/.next/standalone/.next/server/app/api/agent/fs/move/route/app-paths-manifest.json +3 -0
  56. package/.next/standalone/.next/server/app/api/agent/fs/move/route/build-manifest.json +9 -0
  57. package/.next/standalone/.next/server/app/api/agent/fs/move/route/server-reference-manifest.json +4 -0
  58. package/.next/standalone/.next/server/app/api/agent/fs/move/route.js +15 -0
  59. package/.next/standalone/.next/server/app/api/agent/fs/move/route.js.map +5 -0
  60. package/.next/standalone/.next/server/app/api/agent/fs/move/route.js.nft.json +1 -0
  61. package/.next/standalone/.next/server/app/api/agent/fs/move/route_client-reference-manifest.js +3 -0
  62. package/.next/standalone/.next/server/app/api/agent/fs/search/route/app-paths-manifest.json +3 -0
  63. package/.next/standalone/.next/server/app/api/agent/fs/search/route/build-manifest.json +9 -0
  64. package/.next/standalone/.next/server/app/api/agent/fs/search/route/server-reference-manifest.json +4 -0
  65. package/.next/standalone/.next/server/app/api/agent/fs/search/route.js +15 -0
  66. package/.next/standalone/.next/server/app/api/agent/fs/search/route.js.map +5 -0
  67. package/.next/standalone/.next/server/app/api/agent/fs/search/route.js.nft.json +1 -0
  68. package/.next/standalone/.next/server/app/api/agent/fs/search/route_client-reference-manifest.js +3 -0
  69. package/.next/standalone/.next/server/app/api/agent/internal/span/route.js +8 -8
  70. package/.next/standalone/.next/server/app/api/agent/internal/span/route.js.nft.json +1 -1
  71. package/.next/standalone/.next/server/app/api/agent/settings/route.js +8 -8
  72. package/.next/standalone/.next/server/app/api/agent/settings/route.js.nft.json +1 -1
  73. package/.next/standalone/.next/server/app/api/agent/sidecar/[...path]/route.js +7 -7
  74. package/.next/standalone/.next/server/app/api/agent/sidecar/[...path]/route.js.nft.json +1 -1
  75. package/.next/standalone/.next/server/app/api/app-proxy/[...path]/route.js +1 -1
  76. package/.next/standalone/.next/server/app/api/app-proxy/[...path]/route.js.nft.json +1 -1
  77. package/.next/standalone/.next/server/app/api/assets/[...path]/route.js.nft.json +1 -1
  78. package/.next/standalone/.next/server/app/api/auth/[...all]/route.js +3 -3
  79. package/.next/standalone/.next/server/app/api/auth/[...all]/route.js.nft.json +1 -1
  80. package/.next/standalone/.next/server/app/api/system/auth-config/route.js +5 -5
  81. package/.next/standalone/.next/server/app/api/system/auth-config/route.js.nft.json +1 -1
  82. package/.next/standalone/.next/server/app/api/system/auth-settings/route.js +4 -4
  83. package/.next/standalone/.next/server/app/api/system/auth-settings/route.js.nft.json +1 -1
  84. package/.next/standalone/.next/server/app/api/system/browse/route.js +6 -6
  85. package/.next/standalone/.next/server/app/api/system/browse/route.js.nft.json +1 -1
  86. package/.next/standalone/.next/server/app/api/system/clear-root/route.js +5 -5
  87. package/.next/standalone/.next/server/app/api/system/clear-root/route.js.nft.json +1 -1
  88. package/.next/standalone/.next/server/app/api/system/config/route.js +5 -5
  89. package/.next/standalone/.next/server/app/api/system/config/route.js.nft.json +1 -1
  90. package/.next/standalone/.next/server/app/api/system/pins/route.js +4 -4
  91. package/.next/standalone/.next/server/app/api/system/pins/route.js.nft.json +1 -1
  92. package/.next/standalone/.next/server/app/api/system/reveal/route.js +4 -4
  93. package/.next/standalone/.next/server/app/api/system/reveal/route.js.nft.json +1 -1
  94. package/.next/standalone/.next/server/app/api/system/root-status/route.js +4 -4
  95. package/.next/standalone/.next/server/app/api/system/root-status/route.js.nft.json +1 -1
  96. package/.next/standalone/.next/server/app/api/system/set-root/route.js +5 -5
  97. package/.next/standalone/.next/server/app/api/system/set-root/route.js.nft.json +1 -1
  98. package/.next/standalone/.next/server/app/api/upload/[...path]/route.js.nft.json +1 -1
  99. package/.next/standalone/.next/server/app/api/wiki/app/route.js +6 -6
  100. package/.next/standalone/.next/server/app/api/wiki/app/route.js.nft.json +1 -1
  101. package/.next/standalone/.next/server/app/api/wiki/content/route.js +6 -6
  102. package/.next/standalone/.next/server/app/api/wiki/content/route.js.nft.json +1 -1
  103. package/.next/standalone/.next/server/app/api/wiki/file/route.js.nft.json +1 -1
  104. package/.next/standalone/.next/server/app/api/wiki/folder/route.js +5 -5
  105. package/.next/standalone/.next/server/app/api/wiki/folder/route.js.nft.json +1 -1
  106. package/.next/standalone/.next/server/app/api/wiki/move/route.js +6 -6
  107. package/.next/standalone/.next/server/app/api/wiki/move/route.js.nft.json +1 -1
  108. package/.next/standalone/.next/server/app/api/wiki/new-file/route.js +5 -5
  109. package/.next/standalone/.next/server/app/api/wiki/new-file/route.js.nft.json +1 -1
  110. package/.next/standalone/.next/server/app/api/wiki/page/route.js +5 -5
  111. package/.next/standalone/.next/server/app/api/wiki/page/route.js.nft.json +1 -1
  112. package/.next/standalone/.next/server/app/api/wiki/presence/route/app-paths-manifest.json +3 -0
  113. package/.next/standalone/.next/server/app/api/wiki/presence/route/build-manifest.json +9 -0
  114. package/.next/standalone/.next/server/app/api/wiki/presence/route/server-reference-manifest.json +4 -0
  115. package/.next/standalone/.next/server/app/api/wiki/presence/route.js +14 -0
  116. package/.next/standalone/.next/server/app/api/wiki/presence/route.js.map +5 -0
  117. package/.next/standalone/.next/server/app/api/wiki/presence/route.js.nft.json +1 -0
  118. package/.next/standalone/.next/server/app/api/wiki/presence/route_client-reference-manifest.js +3 -0
  119. package/.next/standalone/.next/server/app/api/wiki/route.js +5 -5
  120. package/.next/standalone/.next/server/app/api/wiki/route.js.nft.json +1 -1
  121. package/.next/standalone/.next/server/app/api/wiki/slugs/route.js +5 -5
  122. package/.next/standalone/.next/server/app/api/wiki/slugs/route.js.nft.json +1 -1
  123. package/.next/standalone/.next/server/app/api/wiki/upload/route.js +5 -5
  124. package/.next/standalone/.next/server/app/api/wiki/upload/route.js.nft.json +1 -1
  125. package/.next/standalone/.next/server/app/api/wiki/watch/route.js +6 -6
  126. package/.next/standalone/.next/server/app/api/wiki/watch/route.js.nft.json +1 -1
  127. package/.next/standalone/.next/server/app/index.html +1 -1
  128. package/.next/standalone/.next/server/app/index.rsc +2 -2
  129. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  130. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +2 -2
  131. package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  132. package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
  133. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  134. package/.next/standalone/.next/server/app/page.js +4 -4
  135. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  136. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  137. package/.next/standalone/.next/server/app/signin/page.js +9 -4
  138. package/.next/standalone/.next/server/app/signin/page.js.nft.json +1 -1
  139. package/.next/standalone/.next/server/app/signin/page_client-reference-manifest.js +1 -1
  140. package/.next/standalone/.next/server/app-paths-manifest.json +5 -0
  141. package/.next/standalone/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_0d2jbo5.js +3 -0
  142. package/.next/standalone/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_0ytral2.js +3 -0
  143. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0269d2e._.js +1 -1
  144. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__03h3~3e._.js → [root-of-the-server]__04udrya._.js} +2 -2
  145. package/.next/standalone/.next/server/chunks/[root-of-the-server]__05f6x0i._.js +3 -0
  146. package/.next/standalone/.next/server/chunks/[root-of-the-server]__06-dtd0._.js +3 -0
  147. package/.next/standalone/.next/server/chunks/[root-of-the-server]__06sek6_._.js +1 -1
  148. package/.next/standalone/.next/server/chunks/[root-of-the-server]__09s9qkd._.js +1 -1
  149. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d75a5q._.js +1 -1
  150. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d_da6q._.js +3 -0
  151. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0e7si9p._.js +1 -1
  152. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0hhhvm7._.js +1 -1
  153. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__04g0j8i._.js → [root-of-the-server]__0kdn1le._.js} +2 -2
  154. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0kk26wc._.js +3 -0
  155. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0kur4ro._.js +15 -0
  156. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0p12-6~._.js +1 -1
  157. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qc2~6l._.js +15 -0
  158. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0s~i040._.js +3 -0
  159. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0w47wil._.js +1 -1
  160. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xq124z._.js +3 -0
  161. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0l..bxz._.js → [root-of-the-server]__0xz-_0v._.js} +2 -2
  162. package/.next/standalone/.next/server/chunks/[root-of-the-server]__10w2q~o._.js +1 -1
  163. package/.next/standalone/.next/server/chunks/_079xuln._.js +3 -0
  164. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_agent_fs_file_[___path]_route_actions_0gb11t~.js +3 -0
  165. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_agent_fs_ls_[[___path]]_route_actions_0wfg4nl.js +3 -0
  166. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_agent_fs_move_route_actions_0z34mqq.js +3 -0
  167. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_agent_fs_search_route_actions_0ut_ug..js +3 -0
  168. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_presence_route_actions_0x9d7f4.js +3 -0
  169. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0d89o98._.js → src_lib_auth_server_ts_00f4e0h._.js} +2 -2
  170. package/.next/standalone/.next/server/chunks/ssr/0biy_@better-auth_core_dist_121m_lh._.js +5 -0
  171. package/.next/standalone/.next/server/chunks/ssr/0dhv_better-auth_dist_adapters_kysely-adapter_index_mjs_08ymlcb._.js +3 -0
  172. package/.next/standalone/.next/server/chunks/ssr/0dti_kysely_dist_esm_0-t3o9q._.js +3 -0
  173. package/.next/standalone/.next/server/chunks/ssr/0dti_kysely_dist_esm_01._58q._.js +3 -0
  174. package/.next/standalone/.next/server/chunks/ssr/0p91_next_0f40gy0._.js +6 -0
  175. package/.next/standalone/.next/server/chunks/ssr/{0p91_next_dist_0~2d1tl._.js → 0p91_next_dist_10ud_sa._.js} +2 -2
  176. package/.next/standalone/.next/server/chunks/ssr/0sag_@better-auth_memory-adapter_dist_index_mjs_07-_ka6._.js +3 -0
  177. package/.next/standalone/.next/server/chunks/ssr/0ugq_@better-auth_kysely-adapter_dist_bun-sqlite-dialect-DzNwOpKv_mjs_0lruvb8._.js +3 -0
  178. package/.next/standalone/.next/server/chunks/ssr/0ugq_@better-auth_kysely-adapter_dist_d1-sqlite-dialect-C2B7YsIT_mjs_03n6~tc._.js +3 -0
  179. package/.next/standalone/.next/server/chunks/ssr/0ugq_@better-auth_kysely-adapter_dist_index_mjs_0gi5w.w._.js +4 -0
  180. package/.next/standalone/.next/server/chunks/ssr/0ugq_@better-auth_kysely-adapter_dist_node-sqlite-dialect_mjs_0l4.y~0._.js +3 -0
  181. package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_diagram-OG6HWLK6_mjs_0t5sus6._.js +1 -1
  182. package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_sankeyDiagram-5OEKKPKP_mjs_11ifrnu._.js +1 -1
  183. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__026s8~z._.js +3 -0
  184. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__06mzg2t._.js +3 -0
  185. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0btcd4o._.js +12 -0
  186. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0c~og-9._.js +3 -0
  187. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__134_q7l._.js +1 -1
  188. package/.next/standalone/.next/server/chunks/ssr/_0pqaawz._.js +3 -3
  189. package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_051tcva._.js +3 -0
  190. package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0o~d81.._.js +1 -1
  191. package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0y9k6h~._.js +1 -1
  192. package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0znncy9._.js +1 -1
  193. package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_12-ni1n._.js +1 -1
  194. package/.next/standalone/.next/server/chunks/ssr/src_app_signin_00yk0vm._.js +452 -0
  195. package/.next/standalone/.next/server/chunks/ssr/src_app_signin_signin-form_tsx_0eznlbd._.js +3 -0
  196. package/.next/standalone/.next/server/functions-config-manifest.json +5 -0
  197. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  198. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  199. package/.next/standalone/.next/server/pages/404.html +1 -1
  200. package/.next/standalone/.next/server/pages/500.html +1 -1
  201. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  202. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  203. package/.next/standalone/.next/static/chunks/09-jtayuhrq~b.js +1 -0
  204. package/.next/standalone/.next/static/chunks/0uv7ozzpiyp2_.js +1 -0
  205. package/.next/standalone/.next/static/chunks/135c~rq_ux73w.js +1 -0
  206. package/.next/standalone/.next/static/chunks/{11s9zwr7edrs7.js → 14luv~jq7e6-n.js} +12 -12
  207. package/.next/standalone/README.md +79 -16
  208. package/.next/standalone/agents/bootstrap-prompt.md +12 -1
  209. package/.next/standalone/agents/wiki-viewer-skill/SKILL.md +199 -6
  210. package/.next/standalone/docs/agent-fs-plan.md +65 -7
  211. package/.next/standalone/docs/file-vs-collab-authority.md +124 -0
  212. package/.next/standalone/package.json +1 -1
  213. package/.next/standalone/packages/wiki-viewer-mcp/README.md +194 -0
  214. package/.next/standalone/packages/wiki-viewer-mcp/dist/http-client.js +220 -0
  215. package/.next/standalone/packages/wiki-viewer-mcp/dist/index.js +472 -0
  216. package/.next/standalone/packages/wiki-viewer-mcp/dist/register.js +94 -0
  217. package/.next/standalone/packages/wiki-viewer-mcp/dist/state-cache.js +26 -0
  218. package/.next/standalone/packages/wiki-viewer-mcp/package-lock.json +1716 -0
  219. package/.next/standalone/packages/wiki-viewer-mcp/package.json +41 -0
  220. package/.next/standalone/packages/wiki-viewer-mcp/src/http-client.ts +344 -0
  221. package/.next/standalone/packages/wiki-viewer-mcp/src/index.ts +575 -0
  222. package/.next/standalone/packages/wiki-viewer-mcp/src/register.ts +144 -0
  223. package/.next/standalone/packages/wiki-viewer-mcp/src/state-cache.ts +45 -0
  224. package/.next/standalone/packages/wiki-viewer-mcp/tsconfig.json +19 -0
  225. package/.next/standalone/pnpm-lock.yaml +9 -9
  226. package/.next/standalone/src/app/api/agent/files/[...path]/route.ts +11 -1
  227. package/.next/standalone/src/app/api/agent/fs/file/[...path]/route.ts +344 -0
  228. package/.next/standalone/src/app/api/agent/fs/ls/[[...path]]/route.ts +147 -0
  229. package/.next/standalone/src/app/api/agent/fs/move/route.ts +125 -0
  230. package/.next/standalone/src/app/api/agent/fs/search/route.ts +236 -0
  231. package/.next/standalone/src/app/api/agent/register/route.ts +3 -3
  232. package/.next/standalone/src/app/api/agents/install/route.ts +44 -2
  233. package/.next/standalone/src/app/api/wiki/move/route.ts +10 -1
  234. package/.next/standalone/src/app/api/wiki/presence/route.ts +55 -0
  235. package/.next/standalone/src/app/signin/page.tsx +10 -225
  236. package/.next/standalone/src/app/signin/signin-form.tsx +238 -0
  237. package/.next/standalone/src/components/ai-panel/ai-panel.tsx +49 -0
  238. package/.next/standalone/src/components/editor/editor.tsx +38 -0
  239. package/.next/standalone/src/lib/proof/audit.ts +79 -0
  240. package/.next/standalone/src/lib/proof/auth.ts +2 -2
  241. package/.next/standalone/src/lib/proof/collab-state.ts +79 -0
  242. package/.next/standalone/src/lib/proof/lease.ts +104 -0
  243. package/.next/standalone/src/lib/proof/ops-applier.ts +74 -25
  244. package/.next/standalone/src/lib/proof/raw-fs.ts +198 -0
  245. package/.next/standalone/src/lib/proof/registry.ts +1 -1
  246. package/.next/standalone/src/lib/proof/sidecar.ts +38 -1
  247. package/.next/standalone/src/lib/proof/types.ts +13 -1
  248. package/.next/standalone/src/tests/proof/agent-fs.test.ts +824 -0
  249. package/.next/standalone/src/tests/proof/agents-install.test.ts +53 -0
  250. package/.next/standalone/src/tests/proof/collab-state.test.ts +499 -0
  251. package/.next/standalone/src/tests/proof/reconcile-sidecar.test.ts +195 -0
  252. package/.next/standalone/src/tests/proof/sidecar-lifecycle.test.ts +177 -0
  253. package/.next/standalone/tsconfig.tsbuildinfo +1 -1
  254. package/README.md +79 -16
  255. package/package.json +1 -1
  256. package/.next/standalone/.next/server/app/signin.html +0 -1
  257. package/.next/standalone/.next/server/app/signin.meta +0 -15
  258. package/.next/standalone/.next/server/app/signin.rsc +0 -23
  259. package/.next/standalone/.next/server/app/signin.segments/_full.segment.rsc +0 -23
  260. package/.next/standalone/.next/server/app/signin.segments/_head.segment.rsc +0 -6
  261. package/.next/standalone/.next/server/app/signin.segments/_index.segment.rsc +0 -7
  262. package/.next/standalone/.next/server/app/signin.segments/_tree.segment.rsc +0 -3
  263. package/.next/standalone/.next/server/app/signin.segments/signin/__PAGE__.segment.rsc +0 -9
  264. package/.next/standalone/.next/server/app/signin.segments/signin.segment.rsc +0 -5
  265. package/.next/standalone/.next/server/chunks/[root-of-the-server]__09~~-nd._.js +0 -3
  266. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0w87kiz._.js +0 -3
  267. package/.next/standalone/.next/server/chunks/[root-of-the-server]__12ssbhv._.js +0 -3
  268. package/.next/standalone/.next/server/chunks/node_modules__pnpm_0g0fhfk._.js +0 -3
  269. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__088hqzy._.js +0 -3
  270. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0c147fo._.js +0 -3
  271. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z.1v1z._.js +0 -3
  272. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12zp2dm._.js +0 -3
  273. package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0exqvyf._.js +0 -3
  274. package/.next/standalone/.next/server/chunks/ssr/src_app_signin_page_tsx_1143y49._.js +0 -3
  275. package/.next/standalone/.next/static/chunks/0-_39e4awbk8y.js +0 -1
  276. package/.next/standalone/.next/static/chunks/02bxx~2cg~s6~.js +0 -1
  277. package/.next/standalone/.next/static/chunks/0mj_f8ncf2tks.js +0 -1
  278. /package/.next/standalone/.next/static/{OwXjVuoXDC_gda_BKji1J → 19j4-_brJLoulXAMekpM2}/_buildManifest.js +0 -0
  279. /package/.next/standalone/.next/static/{OwXjVuoXDC_gda_BKji1J → 19j4-_brJLoulXAMekpM2}/_clientMiddlewareManifest.js +0 -0
  280. /package/.next/standalone/.next/static/{OwXjVuoXDC_gda_BKji1J → 19j4-_brJLoulXAMekpM2}/_ssgManifest.js +0 -0
package/README.md CHANGED
@@ -22,8 +22,10 @@
22
22
  Originally a zero-config single-user tool, it now supports:
23
23
 
24
24
  - Multi-user sign-in (Google OAuth or email + password) for teams of 3 to 10 sharing a VPS.
25
- - An HTTP collaboration API that lets AI agents read and edit Markdown files alongside you, with provenance marks, comments, suggestions, and revision-checked mutations.
25
+ - An HTTP API for AI agents with **two tiers**: a raw filesystem (read/write/edit/list/search/move/delete for **all file types**) for fast filework, and a Markdown collaboration layer with provenance marks, comments, suggestions, and revision-checked mutations.
26
+ - A **working-vs-collaborating** safety model: when you have a Markdown doc open, agents automatically defer to the reviewable collab path instead of overwriting it.
26
27
  - Per-agent registration and scoped tokens. No shared bearer secret.
28
+ - An optional `npx wiki-viewer-mcp` adapter so MCP-capable agents (Claude Code, Cursor, Codex) get native file tools against a remote instance.
27
29
 
28
30
  Single-user, no-auth mode still works. Auth turns on automatically once anyone signs up.
29
31
 
@@ -279,7 +281,23 @@ The Markdown editor now sends a `baseRevision` with every save. If another user
279
281
 
280
282
  ## Working with AI agents
281
283
 
282
- wiki-viewer exposes an HTTP collaboration protocol so agents (Claude, Cursor, ChatGPT desktop, custom scripts) can read and edit Markdown files. Every AI-authored insert is wrapped in an inline `<proof-span>` mark so the human reviewer can see, accept, or revert each change.
284
+ wiki-viewer exposes an HTTP API so agents (Claude, Cursor, ChatGPT desktop, custom scripts) can work with files in a running instance locally or remotely almost as if they were on their own filesystem. There are **two tiers**, sharing one auth/scope/lock spine:
285
+
286
+ - **Tier 1 — Raw filesystem** (`/api/agent/fs/*`): `read`, `write`, `edit`, `list`, `search`, `move`, `delete` for **every file type** (code, configs, PDFs, notebooks, Markdown — anything). Fast, boring, byte-accurate. Mutations are audited.
287
+ - **Tier 2 — Markdown collaboration** (`/api/agent/files/*`): structured block-ops where every AI-authored insert is wrapped in an inline `<proof-span>` mark so the human reviewer can see, accept, or revert each change, plus comments and suggestions. Tier-2 is API-compatible in spirit with [Proof SDK](https://github.com/EveryInc/proof-sdk).
288
+
289
+ ### Which tier? Working mode vs collaborating mode
290
+
291
+ Before editing a Markdown file, an agent reads it and checks the **`X-Collab-State`** response header:
292
+
293
+ | `X-Collab-State` | Meaning | Agent uses |
294
+ | ---------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------- |
295
+ | `active` | A human has the doc open, or it has pending suggestions/comments | **Tier-2 block-ops** (reviewable). A raw write is rejected `409 COLLAB_ACTIVE`. |
296
+ | `tracked` | Has a collab sidecar, nobody editing now | Prefer Tier-2 for prose; raw OK for mechanical edits |
297
+ | `untracked` | Plain Markdown, never collaborated on | Either tier |
298
+ | `not-markdown` | Any non-`.md` file | **Tier-1 raw only** |
299
+
300
+ This is enforced, not advisory: the collab state is re-checked atomically inside the write lock, so an agent can never silently clobber a doc you just opened. The browser editor sends a presence heartbeat to drive the `active` state. See [`docs/file-vs-collab-authority.md`](docs/file-vs-collab-authority.md) for the full authority model.
283
301
 
284
302
  The protocol is intentionally API-compatible in spirit with [Proof SDK](https://github.com/EveryInc/proof-sdk).
285
303
 
@@ -306,7 +324,42 @@ npx skills add anh-chu/wiki-viewer/agents/wiki-viewer-skill
306
324
 
307
325
  For any chat agent, paste the bootstrap prompt from `<your-server>/agents/install` (also visible in the AI Panel). The agent fetches `/api/agents/install` and learns the full op vocabulary at runtime.
308
326
 
309
- ### Op vocabulary
327
+ ### Tier 1 — raw filesystem
328
+
329
+ Work with any file type. All routes take `Authorization: Bearer <token>` + `X-Agent-Id`, are scope-checked, and reject path traversal, symlink escapes, and anything under `.proof/`.
330
+
331
+ ```bash
332
+ # Read (bytes; ETag is the sha256, supports Range, returns X-Collab-State)
333
+ curl -sD- -H "Authorization: Bearer $TOKEN" -H "X-Agent-Id: ai:claude" \
334
+ https://wiki.team.com/api/agent/fs/file/src/util.ts
335
+
336
+ # Write/overwrite (atomic). If-Match: <sha256> is required to overwrite;
337
+ # omit it to create. ?mkdirs=true creates parent dirs. ?force=true overrides (audited).
338
+ curl -s -X PUT -H "Authorization: Bearer $TOKEN" -H "X-Agent-Id: ai:claude" \
339
+ -H "If-Match: <sha256-from-read>" --data-binary @util.ts \
340
+ https://wiki.team.com/api/agent/fs/file/src/util.ts
341
+
342
+ # List a directory (scope-filtered)
343
+ curl -s -H "Authorization: Bearer $TOKEN" -H "X-Agent-Id: ai:claude" \
344
+ "https://wiki.team.com/api/agent/fs/ls/src?recursive=true&limit=500"
345
+
346
+ # Search (server-side; kills round-trips)
347
+ curl -s -X POST -H "Authorization: Bearer $TOKEN" -H "X-Agent-Id: ai:claude" \
348
+ -H "Content-Type: application/json" \
349
+ -d '{"kind":"grep","query":"TODO","glob":"**/*.ts"}' \
350
+ https://wiki.team.com/api/agent/fs/search
351
+
352
+ # Move and delete (delete needs the `delete` scope + If-Match)
353
+ curl -s -X POST -H "Authorization: Bearer $TOKEN" -H "X-Agent-Id: ai:claude" \
354
+ -H "Content-Type: application/json" -d '{"from":"a.md","to":"b.md"}' \
355
+ https://wiki.team.com/api/agent/fs/move
356
+ curl -s -X DELETE -H "Authorization: Bearer $TOKEN" -H "X-Agent-Id: ai:claude" \
357
+ -H "If-Match: <sha256>" https://wiki.team.com/api/agent/fs/file/old.md
358
+ ```
359
+
360
+ Mutating a Markdown file via raw write emits a `file.rawWritten` event and re-binds the collab sidecar; if the doc is `active` it is rejected `409 COLLAB_ACTIVE` (use Tier-2 instead). Use the **`npx wiki-viewer-mcp`** adapter to get all of this as standard MCP file tools — it handles `If-Match`, mode-awareness, and edit-via-read-then-write for you.
361
+
362
+ ### Tier 2 — op vocabulary (Markdown)
310
363
 
311
364
  Block-level edits (revision-checked, idempotent):
312
365
 
@@ -356,15 +409,23 @@ Owner-only (session cookie):
356
409
 
357
410
  Agent routes (bearer + `X-Agent-Id`, scope-checked):
358
411
 
359
- | Method | Path | Required scope |
360
- | ------ | ---------------------------------------- | --------------------- |
361
- | `GET` | `/api/agent/files/<path.md>` | `read` + path match |
362
- | `POST` | `/api/agent/files/<path.md>` | `mutate` + path match |
363
- | `GET` | `/api/agent/events/<path.md>?after=<id>` | `read` + path match |
364
- | `POST` | `/api/agent/events/<path.md>` | `read` + path match |
365
- | `GET` | `/api/agent/sidecar/<path.md>` | `read` + path match |
366
- | `GET` | `/api/agent/settings` | `read` |
367
- | `GET` | `/api/agent/activity` | `read` |
412
+ | Method | Path | Required scope | Tier |
413
+ | -------- | ---------------------------------------- | --------------------- | ---- |
414
+ | `GET` | `/api/agent/fs/file/<path>` | `read` + path match | 1 |
415
+ | `PUT` | `/api/agent/fs/file/<path>` | `mutate` + path match | 1 |
416
+ | `DELETE` | `/api/agent/fs/file/<path>` | `delete` + path match | 1 |
417
+ | `GET` | `/api/agent/fs/ls/<path>` | `read` + path match | 1 |
418
+ | `POST` | `/api/agent/fs/move` | `mutate` (src+dest) | 1 |
419
+ | `POST` | `/api/agent/fs/search` | `read` (per match) | 1 |
420
+ | `GET` | `/api/agent/files/<path.md>` | `read` + path match | 2 |
421
+ | `POST` | `/api/agent/files/<path.md>` | `mutate` + path match | 2 |
422
+ | `GET` | `/api/agent/events/<path.md>?after=<id>` | `read` + path match | 2 |
423
+ | `POST` | `/api/agent/events/<path.md>` | `read` + path match | 2 |
424
+ | `GET` | `/api/agent/sidecar/<path.md>` | `read` + path match | 2 |
425
+ | `GET` | `/api/agent/settings` | `read` | — |
426
+ | `GET` | `/api/agent/activity` | `read` | — |
427
+
428
+ Scopes: `paths` is a glob list (directories work natively, e.g. `notes/**`); `ops` is any of `read`, `mutate` (create/overwrite/move), `delete` (remove). Grant `["read","mutate"]` for edit-but-never-delete.
368
429
 
369
430
  ### Full curl trace
370
431
 
@@ -373,7 +434,7 @@ Agent routes (bearer + `X-Agent-Id`, scope-checked):
373
434
  curl -s -X POST https://wiki.team.com/api/agent/register \
374
435
  -H "Content-Type: application/json" \
375
436
  -d '{"id":"ai:claude","displayName":"Claude",
376
- "scope":{"paths":["**/*"],"ops":["read","mutate"]}}'
437
+ "scope":{"paths":["**/*"],"ops":["read","mutate","delete"]}}'
377
438
  # -> { "registrationId":"reg_abc","pollUrl":"/api/agent/register/reg_abc","status":"pending" }
378
439
 
379
440
  # 2. Owner approves in the AI Panel.
@@ -406,9 +467,11 @@ Response codes to handle:
406
467
 
407
468
  - `401 UNAUTHORIZED` — bad token or `X-Agent-Id`.
408
469
  - `403 FORBIDDEN` — out of scope or `by` mismatches identity.
409
- - `409 STALE_REVISION` — refetch and retry. Response includes a fresh snapshot.
410
- - `409 BLOCK_NOT_FOUND` — the ref no longer exists.
411
- - `409 IDEMPOTENCY_KEY_REUSED` — same key, different body.
470
+ - `409 STALE_REVISION` — refetch and retry. Response includes a fresh snapshot. (Tier 2)
471
+ - `409 BLOCK_NOT_FOUND` — the ref no longer exists. (Tier 2)
472
+ - `409 IDEMPOTENCY_KEY_REUSED` — same key, different body. (Tier 2)
473
+ - `409 COLLAB_ACTIVE` — raw write to a Markdown doc a human is editing; use Tier-2 block-ops (response includes the snapshot URL) or `?force=true`. (Tier 1)
474
+ - `412 PRECONDITION_FAILED` — `If-Match` sha mismatch (file changed); re-read and retry. (Tier 1)
412
475
  - `429 RATE_LIMITED` — honor `Retry-After`. Default 60 ops/minute per agent.
413
476
 
414
477
  ### Agent rate limit override
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wiki-viewer",
3
- "version": "1.4.2",
3
+ "version": "1.5.0",
4
4
  "description": "Local file viewer and wiki — view markdown, HTML, PDFs, notebooks, office docs, and more from any directory",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1 +0,0 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/83afe278b6a6bb3c-s.p.0q-301v4kxxnr.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/chunks/0zay6349~v_wc.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0ocp.6r7w_saw.js"/><script src="/_next/static/chunks/0quh-cfcrp2ib.js" async=""></script><script src="/_next/static/chunks/0vp-ahhagxptc.js" async=""></script><script src="/_next/static/chunks/turbopack-12~z-mr7b9b50.js" async=""></script><script src="/_next/static/chunks/0umlolnxs~j3r.js" async=""></script><script src="/_next/static/chunks/057umwogp53v_.js" async=""></script><script src="/_next/static/chunks/0ky8fha87kp0_.js" async=""></script><script src="/_next/static/chunks/0mj_f8ncf2tks.js" async=""></script><script src="/_next/static/chunks/07mgvytssm8ww.js" async=""></script><meta name="next-size-adjust" content=""/><title>Wiki Viewer</title><meta name="description" content="Local file browser, viewer, and editor"/><link rel="icon" href="/icon.svg?icon.0_efx.p39qv7r.svg" sizes="any" type="image/svg+xml"/><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="inter_5901b7c6-module__ec5Qua__variable font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","system",null,["light","dark"],null,true,true)</script><div class="min-h-screen flex items-center justify-center bg-background"><div class="w-full max-w-sm rounded-lg border border-border bg-card p-8 shadow-sm"><h1 class="mb-6 text-xl font-semibold text-foreground">Sign in to wiki-viewer</h1><form class="space-y-4"><div><label class="mb-1 block text-sm font-medium text-foreground" for="email">Email</label><input id="email" type="email" autoComplete="email" required="" class="w-full rounded-md border border-border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring" value=""/></div><div><label class="mb-1 block text-sm font-medium text-foreground" for="password">Password</label><input id="password" type="password" autoComplete="current-password" required="" minLength="8" class="w-full rounded-md border border-border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring" value=""/></div><button type="submit" class="w-full rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50">Sign in</button></form><p class="mt-4 text-center text-sm text-muted-foreground">No account?<!-- --> <button type="button" class="font-medium text-foreground underline-offset-4 hover:underline">Sign up</button></p></div></div><!--$--><!--/$--><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><script src="/_next/static/chunks/0ocp.6r7w_saw.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[427423,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"ThemeProvider\"]\n3:I[902063,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"default\"]\n4:I[259666,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"default\"]\n5:I[187014,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"Toaster\"]\n6:I[687919,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"ClientPageRoot\"]\n7:I[897339,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\",\"/_next/static/chunks/0mj_f8ncf2tks.js\",\"/_next/static/chunks/07mgvytssm8ww.js\"],\"default\"]\na:I[62711,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"OutletBoundary\"]\nb:\"$Sreact.suspense\"\ne:I[62711,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"ViewportBoundary\"]\n10:I[62711,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"MetadataBoundary\"]\n12:I[514743,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0zay6349~v_wc.css\",\"style\"]\n:HL[\"/_next/static/media/83afe278b6a6bb3c-s.p.0q-301v4kxxnr.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"signin\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"signin\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0zay6349~v_wc.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/0umlolnxs~j3r.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/057umwogp53v_.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/_next/static/chunks/0ky8fha87kp0_.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"inter_5901b7c6-module__ec5Qua__variable font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],[\"$\",\"$L5\",null,{\"theme\":\"system\",\"position\":\"bottom-right\",\"toastOptions\":{\"className\":\"border-border bg-card text-card-foreground\"}}]]}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L6\",null,{\"Component\":\"$7\",\"serverProvidedParams\":{\"searchParams\":{},\"params\":{},\"promises\":[\"$@8\",\"$@9\"]}}],[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/0mj_f8ncf2tks.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/07mgvytssm8ww.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$La\",null,{\"children\":[\"$\",\"$b\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@c\"}]}]]}],{},null,false,null]},null,false,\"$@d\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$Le\",null,{\"children\":\"$Lf\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L10\",null,{\"children\":[\"$\",\"$b\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L11\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$12\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0zay6349~v_wc.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"OwXjVuoXDC_gda_BKji1J\"}\n"])</script><script>self.__next_f.push([1,"13:[]\nd:\"$W13\"\n8:{}\n9:\"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params\"\n"])</script><script>self.__next_f.push([1,"f:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"14:I[319772,[\"/_next/static/chunks/0umlolnxs~j3r.js\",\"/_next/static/chunks/057umwogp53v_.js\",\"/_next/static/chunks/0ky8fha87kp0_.js\"],\"IconMark\"]\nc:null\n11:[[\"$\",\"title\",\"0\",{\"children\":\"Wiki Viewer\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Local file browser, viewer, and editor\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/icon.svg?icon.0_efx.p39qv7r.svg\",\"sizes\":\"any\",\"type\":\"image/svg+xml\"}],[\"$\",\"$L14\",\"3\",{}]]\n"])</script></body></html>
@@ -1,15 +0,0 @@
1
- {
2
- "headers": {
3
- "x-nextjs-stale-time": "300",
4
- "x-nextjs-prerender": "1",
5
- "x-next-cache-tags": "_N_T_/layout,_N_T_/signin/layout,_N_T_/signin/page,_N_T_/signin"
6
- },
7
- "segmentPaths": [
8
- "/_tree",
9
- "/_full",
10
- "/signin/__PAGE__",
11
- "/signin",
12
- "/_index",
13
- "/_head"
14
- ]
15
- }
@@ -1,23 +0,0 @@
1
- 1:"$Sreact.fragment"
2
- 2:I[427423,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"ThemeProvider"]
3
- 3:I[902063,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"default"]
4
- 4:I[259666,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"default"]
5
- 5:I[187014,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"Toaster"]
6
- 6:I[687919,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"ClientPageRoot"]
7
- 7:I[897339,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js","/_next/static/chunks/0mj_f8ncf2tks.js","/_next/static/chunks/07mgvytssm8ww.js"],"default"]
8
- a:I[62711,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"OutletBoundary"]
9
- b:"$Sreact.suspense"
10
- e:I[62711,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"ViewportBoundary"]
11
- 10:I[62711,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"MetadataBoundary"]
12
- 12:I[514743,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"default",1]
13
- :HL["/_next/static/chunks/0zay6349~v_wc.css","style"]
14
- :HL["/_next/static/media/83afe278b6a6bb3c-s.p.0q-301v4kxxnr.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
15
- 0:{"P":null,"c":["","signin"],"q":"","i":false,"f":[[["",{"children":["signin",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0zay6349~v_wc.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0umlolnxs~j3r.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/057umwogp53v_.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/_next/static/chunks/0ky8fha87kp0_.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"className":"inter_5901b7c6-module__ec5Qua__variable font-sans antialiased","children":["$","$L2",null,{"children":[["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L5",null,{"theme":"system","position":"bottom-right","toastOptions":{"className":"border-border bg-card text-card-foreground"}}]]}]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/0mj_f8ncf2tks.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/07mgvytssm8ww.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,null]},null,false,"$@d"]},null,false,null],["$","$1","h",{"children":[null,["$","$Le",null,{"children":"$Lf"}],["$","div",null,{"hidden":true,"children":["$","$L10",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L11"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$12",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0zay6349~v_wc.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"OwXjVuoXDC_gda_BKji1J"}
16
- 13:[]
17
- d:"$W13"
18
- 8:{}
19
- 9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params"
20
- f:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
21
- 14:I[319772,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"IconMark"]
22
- c:null
23
- 11:[["$","title","0",{"children":"Wiki Viewer"}],["$","meta","1",{"name":"description","content":"Local file browser, viewer, and editor"}],["$","link","2",{"rel":"icon","href":"/icon.svg?icon.0_efx.p39qv7r.svg","sizes":"any","type":"image/svg+xml"}],["$","$L14","3",{}]]
@@ -1,23 +0,0 @@
1
- 1:"$Sreact.fragment"
2
- 2:I[427423,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"ThemeProvider"]
3
- 3:I[902063,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"default"]
4
- 4:I[259666,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"default"]
5
- 5:I[187014,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"Toaster"]
6
- 6:I[687919,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"ClientPageRoot"]
7
- 7:I[897339,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js","/_next/static/chunks/0mj_f8ncf2tks.js","/_next/static/chunks/07mgvytssm8ww.js"],"default"]
8
- a:I[62711,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"OutletBoundary"]
9
- b:"$Sreact.suspense"
10
- e:I[62711,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"ViewportBoundary"]
11
- 10:I[62711,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"MetadataBoundary"]
12
- 12:I[514743,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"default",1]
13
- :HL["/_next/static/chunks/0zay6349~v_wc.css","style"]
14
- :HL["/_next/static/media/83afe278b6a6bb3c-s.p.0q-301v4kxxnr.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
15
- 0:{"P":null,"c":["","signin"],"q":"","i":false,"f":[[["",{"children":["signin",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0zay6349~v_wc.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0umlolnxs~j3r.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/057umwogp53v_.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/_next/static/chunks/0ky8fha87kp0_.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"className":"inter_5901b7c6-module__ec5Qua__variable font-sans antialiased","children":["$","$L2",null,{"children":[["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L5",null,{"theme":"system","position":"bottom-right","toastOptions":{"className":"border-border bg-card text-card-foreground"}}]]}]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/0mj_f8ncf2tks.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/07mgvytssm8ww.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,null]},null,false,"$@d"]},null,false,null],["$","$1","h",{"children":[null,["$","$Le",null,{"children":"$Lf"}],["$","div",null,{"hidden":true,"children":["$","$L10",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L11"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$12",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0zay6349~v_wc.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"OwXjVuoXDC_gda_BKji1J"}
16
- 13:[]
17
- d:"$W13"
18
- 8:{}
19
- 9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params"
20
- f:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
21
- 14:I[319772,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"IconMark"]
22
- c:null
23
- 11:[["$","title","0",{"children":"Wiki Viewer"}],["$","meta","1",{"name":"description","content":"Local file browser, viewer, and editor"}],["$","link","2",{"rel":"icon","href":"/icon.svg?icon.0_efx.p39qv7r.svg","sizes":"any","type":"image/svg+xml"}],["$","$L14","3",{}]]
@@ -1,6 +0,0 @@
1
- 1:"$Sreact.fragment"
2
- 2:I[62711,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"ViewportBoundary"]
3
- 3:I[62711,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"MetadataBoundary"]
4
- 4:"$Sreact.suspense"
5
- 5:I[319772,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"IconMark"]
6
- 0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"Wiki Viewer"}],["$","meta","1",{"name":"description","content":"Local file browser, viewer, and editor"}],["$","link","2",{"rel":"icon","href":"/icon.svg?icon.0_efx.p39qv7r.svg","sizes":"any","type":"image/svg+xml"}],["$","$L5","3",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"OwXjVuoXDC_gda_BKji1J"}
@@ -1,7 +0,0 @@
1
- 1:"$Sreact.fragment"
2
- 2:I[427423,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"ThemeProvider"]
3
- 3:I[902063,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"default"]
4
- 4:I[259666,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"default"]
5
- 5:I[187014,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"Toaster"]
6
- :HL["/_next/static/chunks/0zay6349~v_wc.css","style"]
7
- 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0zay6349~v_wc.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/0umlolnxs~j3r.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/057umwogp53v_.js","async":true}],["$","script","script-2",{"src":"/_next/static/chunks/0ky8fha87kp0_.js","async":true}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"className":"inter_5901b7c6-module__ec5Qua__variable font-sans antialiased","children":["$","$L2",null,{"children":[["$","$L3",null,{"parallelRouterKey":"children","template":["$","$L4",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}],["$","$L5",null,{"theme":"system","position":"bottom-right","toastOptions":{"className":"border-border bg-card text-card-foreground"}}]]}]}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"OwXjVuoXDC_gda_BKji1J"}
@@ -1,3 +0,0 @@
1
- :HL["/_next/static/chunks/0zay6349~v_wc.css","style"]
2
- :HL["/_next/static/media/83afe278b6a6bb3c-s.p.0q-301v4kxxnr.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
3
- 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"signin","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"OwXjVuoXDC_gda_BKji1J"}
@@ -1,9 +0,0 @@
1
- 1:"$Sreact.fragment"
2
- 2:I[687919,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"ClientPageRoot"]
3
- 3:I[897339,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js","/_next/static/chunks/0mj_f8ncf2tks.js","/_next/static/chunks/07mgvytssm8ww.js"],"default"]
4
- 6:I[62711,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"OutletBoundary"]
5
- 7:"$Sreact.suspense"
6
- 0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/0mj_f8ncf2tks.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/07mgvytssm8ww.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"OwXjVuoXDC_gda_BKji1J"}
7
- 4:{}
8
- 5:"$0:rsc:props:children:0:props:serverProvidedParams:params"
9
- 8:null
@@ -1,5 +0,0 @@
1
- 1:"$Sreact.fragment"
2
- 2:I[902063,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"default"]
3
- 3:I[259666,["/_next/static/chunks/0umlolnxs~j3r.js","/_next/static/chunks/057umwogp53v_.js","/_next/static/chunks/0ky8fha87kp0_.js"],"default"]
4
- 4:[]
5
- 0:{"rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"isPartial":false,"staleTime":300,"varyParams":"$W4","buildId":"OwXjVuoXDC_gda_BKji1J"}
@@ -1,3 +0,0 @@
1
- module.exports=[504445,e=>{"use strict";var t=e.i(750227);let n=globalThis;function a(){return n.__wikiRootDir??""}!n.__wikiRootDir&&process.env.ROOT_DIR&&(n.__wikiRootDir=t.default.resolve(process.env.ROOT_DIR)),e.s(["clearRootDir",0,function(){n.__wikiRootDir=void 0},"getRootDir",0,a,"isRootDirSet",0,function(){return!!n.__wikiRootDir},"safeRootPath",0,function(e){let n=a();if(!n)return null;if(!e||"."===e)return n;let r=t.default.resolve(n,e);return r===n||r.startsWith(n+t.default.sep)?r:null},"setRootDir",0,function(e){n.__wikiRootDir=t.default.resolve(e)}])},413895,e=>{"use strict";var t=e.i(666680);let n=globalThis;n.__wvPendingRegs||(n.__wvPendingRegs=new Map);let a=n.__wvPendingRegs;e.s(["approveRegistration",0,function(e,t){let n=a.get(e);return!!n&&"pending"===n.status&&(n.status="approved",n.tokenPlaintext=t,n.resolvedAt=new Date().toISOString(),!0)},"consumeRegistration",0,function(e){let t=a.get(e);if(!t||"approved"!==t.status||!t.tokenPlaintext)return null;let n=t.tokenPlaintext;return t.status="consumed",t.tokenPlaintext=void 0,n},"createRegistration",0,function(e){let n=`reg_${(0,t.randomBytes)(16).toString("hex")}`,r={registrationId:n,agentId:e.agentId,displayName:e.displayName,requestedScope:e.requestedScope??{paths:["**/*"],ops:["read","mutate"]},requestedAt:new Date().toISOString(),status:"pending"};return a.set(n,r),r},"denyRegistration",0,function(e){let t=a.get(e);return!!t&&"pending"===t.status&&(t.status="denied",t.resolvedAt=new Date().toISOString(),!0)},"getRegistration",0,function(e){return a.get(e)},"listPendingRegistrations",0,function(){return[...a.values()].filter(e=>"pending"===e.status)}])},814747,(e,t,n)=>{t.exports=e.x("path",()=>require("path"))},224361,(e,t,n)=>{t.exports=e.x("util",()=>require("util"))},688947,(e,t,n)=>{t.exports=e.x("stream",()=>require("stream"))},427699,(e,t,n)=>{t.exports=e.x("events",()=>require("events"))},228064,e=>{"use strict";var t=e.i(666680),n=e.i(912714),a=e.i(660526),r=e.i(750227),i=e.i(832852);let s="__registry__",o=new Map;function l(){let e=process.env.HOME??a.default.homedir();return r.default.join(e,".wiki-viewer")}function u(){return r.default.join(l(),"agents.json")}function d(e){return(0,t.createHash)("sha256").update(e,"utf8").digest("hex")}async function c(){try{let e=await (0,n.readFile)(u(),"utf8"),t=JSON.parse(e);return{version:1,agents:Array.isArray(t.agents)?t.agents:[]}}catch{return null}}async function p(e){await (0,n.mkdir)(l(),{recursive:!0});let t=u()+".tmp";await (0,n.writeFile)(t,JSON.stringify(e,null,2),{encoding:"utf8",mode:384});try{await (0,n.chmod)(t,384)}catch{}await (0,n.rename)(t,u())}async function g(){let e=await c();if(e)return e;let t={version:1,agents:[]};return await p(t),t}async function h(e){let n=await c();if(!n)return null;let a=d(e);for(let e of n.agents)if(function(e,n){let a=Buffer.from(e.padEnd(64,"0"),"utf8"),r=Buffer.from(n.padEnd(64,"0"),"utf8");return a.length===r.length&&(0,t.timingSafeEqual)(a,r)&&e.length===n.length}(e.tokenHash,a))return e;return null}async function f(e){await (0,i.withFileMutex)(s,async()=>{let t=await g(),n=t.agents.findIndex(t=>t.id===e.id);n>=0?t.agents[n]=e:t.agents.push(e),await p(t)})}async function v(e){return(0,i.withFileMutex)(s,async()=>{let t=await c();if(!t)return!1;let n=t.agents.length;return t.agents=t.agents.filter(t=>t.id!==e),t.agents.length!==n&&(await p(t),!0)})}async function R(e){Date.now()-(o.get(e)??0)<3e4||await (0,i.withFileMutex)(s,async()=>{let t=await c();if(!t)return;let n=t.agents.find(t=>t.id===e);n&&(n.lastSeen=new Date().toISOString(),o.set(e,Date.now()),await p(t))})}e.s(["addAgent",0,f,"hashToken",0,d,"lookupAgentByToken",0,h,"readRegistry",0,c,"removeAgent",0,v,"updateLastSeen",0,R])},215043,552350,e=>{"use strict";var t=e.i(228064);function n(e,t){return(function(e){let t="^",n=0;for(;n<e.length;)"*"===e[n]&&"*"===e[n+1]?(t+=".*","/"===e[n+=2]&&(t+="(?:.+/)?",n++)):("*"===e[n]?t+="[^/]*":"?"===e[n]?t+="[^/]":t+=e[n].replace(/[.+^${}()|[\]\\]/g,"\\$&"),n++);return new RegExp(t+="$")})(e).test(t)}e.s(["matchGlob",0,n],552350);var a=e.i(254226);async function r(e){let n=await (0,a.getSessionFromRequest)(e);if(n?.user){let e=n.user;return{ok:!0,agent:{id:`user:${e.id}`,displayName:e.name,tokenHash:"",scope:{paths:["**/*"],ops:["read","mutate"]},createdAt:"",lastSeen:""}}}let r=e.headers.get("authorization")??"",i=r.startsWith("Bearer ")?r.slice(7).trim():"";if(!i)return{ok:!1,code:"UNAUTHORIZED",message:"No credentials"};let s=await (0,t.lookupAgentByToken)(i);if(!s)return{ok:!1,code:"UNAUTHORIZED",message:"Unknown or invalid token"};let o=e.headers.get("x-agent-id")??"";return o?o!==s.id?{ok:!1,code:"UNAUTHORIZED",message:"X-Agent-Id does not match token owner"}:((0,t.updateLastSeen)(s.id),{ok:!0,agent:s}):{ok:!1,code:"UNAUTHORIZED",message:"X-Agent-Id header required"}}process.env.AGENT_BEARER_TOKEN&&console.warn("[wiki-viewer] AGENT_BEARER_TOKEN is no longer used; manage agents via the AI Panel."),e.s(["checkAuth",0,r,"enforceScope",0,function(e,t){let{scope:a}=e;return a.ops.includes(t.op)?t.filePath&&!a.paths.some(e=>n(e,t.filePath))?{ok:!1,code:"FORBIDDEN",message:`Agent scope does not cover path "${t.filePath}"`}:{ok:!0}:{ok:!1,code:"FORBIDDEN",message:`Agent scope does not allow "${t.op}"`}},"verifyBy",0,function(e,t){return e.id.startsWith("user:")?!t||"owner"===t||"human"===t||t.startsWith("human:")||t===e.id?{ok:!0}:{ok:!1,code:"FORBIDDEN",message:'User agent must use "human", "owner", or own id in "by" field'}:t!==e.id?{ok:!1,code:"FORBIDDEN",message:`"by" field must equal agent id "${e.id}"`}:{ok:!0}}],215043)},280137,e=>{"use strict";var t=e.i(364564),n=e.i(102095),a=e.i(691091),r=e.i(475331),i=e.i(490301),s=e.i(670943),o=e.i(690324),l=e.i(243133),u=e.i(404870),d=e.i(420180),c=e.i(867883),p=e.i(336708),g=e.i(682278),h=e.i(157569),f=e.i(844146),v=e.i(193695);e.i(105888);var R=e.i(530564),m=e.i(702414),w=e.i(215043),_=e.i(504445),y=e.i(228064),E=e.i(413895);async function k(e){let t=await (0,w.checkAuth)(e);if(!t.ok)return m.NextResponse.json({error:"UNAUTHORIZED"},{status:401});let n=(0,w.enforceScope)(t.agent,{op:"read"});if(!n.ok)return m.NextResponse.json({error:n.code,message:n.message},{status:403});let a=await (0,y.readRegistry)(),r=a?.agents.length??0,i=(0,E.listPendingRegistrations)().length;return m.NextResponse.json({rateLimit:Number(process.env.AGENT_RATE_LIMIT)||60,root:(0,_.getRootDir)(),registeredAgents:r,pendingRegistrations:i})}e.s(["GET",0,k,"runtime",0,"nodejs"],232229);var A=e.i(232229);let x=new t.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/agent/settings/route",pathname:"/api/agent/settings",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/agent/settings/route.ts",nextConfigOutput:"standalone",userland:A,...{}}),{workAsyncStorage:N,workUnitAsyncStorage:D,serverHooks:P}=x;async function T(e,t,a){a.requestMeta&&(0,r.setRequestMeta)(e,a.requestMeta),x.isDev&&(0,r.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let m="/api/agent/settings/route";m=m.replace(/\/index$/,"")||"/";let w=await x.prepare(e,t,{srcPage:m,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:_,params:y,nextConfig:E,parsedUrl:k,isDraftMode:A,prerenderManifest:N,routerServerContext:D,isOnDemandRevalidate:P,revalidateOnlyGenerated:T,resolvedPathname:O,clientReferenceManifest:S,serverActionsManifest:I}=w,C=(0,o.normalizeAppPath)(m),q=!!(N.dynamicRoutes[C]||N.routes[O]),b=async()=>((null==D?void 0:D.render404)?await D.render404(e,t,k,!1):t.end("This page could not be found"),null);if(q&&!A){let e=!!N.routes[O],t=N.dynamicRoutes[C];if(t&&!1===t.fallback&&!e){if(E.adapterPath)return await b();throw new v.NoFallbackError}}let U=null;!q||x.isDev||A||(U="/index"===(U=O)?"/":U);let j=!0===x.isDev||!q,H=q&&!j;I&&S&&(0,s.setManifestsSingleton)({page:m,clientReferenceManifest:S,serverActionsManifest:I});let M=e.method||"GET",B=(0,i.getTracer)(),F=B.getActiveScopeSpan(),$=!!(null==D?void 0:D.isWrappedByNextServer),K=!!(0,r.getRequestMeta)(e,"minimalMode"),L=(0,r.getRequestMeta)(e,"incrementalCache")||await x.getIncrementalCache(e,E,N,K);null==L||L.resetRequestCache(),globalThis.__incrementalCache=L;let G={params:y,previewProps:N.preview,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:j,incrementalCache:L,cacheLifeProfiles:E.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,n,a,r)=>x.onRequestError(e,t,a,r,D)},sharedContext:{buildId:_}},z=new l.NodeNextRequest(e),W=new l.NodeNextResponse(t),Z=u.NextRequestAdapter.fromNodeNextRequest(z,(0,u.signalFromNodeResponse)(t));try{let r,s=async e=>x.handle(Z,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let n=B.getRootSpanAttributes();if(!n)return;if(n.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${n.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=n.get("next.route");if(a){let t=`${M} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),r&&r!==e&&(r.setAttribute("http.route",a),r.updateName(t))}else e.updateName(`${M} ${m}`)}),o=async r=>{var i,o;let l=async({previousCacheEntry:n})=>{try{if(!K&&P&&T&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(r);e.fetchMetrics=G.renderOpts.fetchMetrics;let o=G.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let l=G.renderOpts.collectedTags;if(!q)return await (0,p.sendResponse)(z,W,i,G.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,g.toNodeOutgoingHttpHeaders)(i.headers);l&&(t[f.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let n=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,a=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:R.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:a}}}}catch(t){throw(null==n?void 0:n.isStale)&&await x.onRequestError(e,t,{routerKind:"App Router",routePath:m,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:P})},!1,D),t}},u=await x.handleResponse({req:e,nextConfig:E,cacheKey:U,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:P,revalidateOnlyGenerated:T,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:K});if(!q)return null;if((null==u||null==(i=u.value)?void 0:i.kind)!==R.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(o=u.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});K||t.setHeader("x-nextjs-cache",P?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,g.fromNodeOutgoingHttpHeaders)(u.value.headers);return K&&q||d.delete(f.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,h.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(z,W,new Response(u.value.body,{headers:d,status:u.value.status||200})),null};$&&F?await o(F):(r=B.getActiveScopeSpan(),await B.withPropagatedContext(e.headers,()=>B.trace(d.BaseServerSpan.handleRequest,{spanName:`${M} ${m}`,kind:i.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},o),void 0,!$))}catch(t){if(t instanceof v.NoFallbackError||await x.onRequestError(e,t,{routerKind:"App Router",routePath:C,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:P})},!1,D),q)throw t;return await (0,p.sendResponse)(z,W,new Response(null,{status:500})),null}}e.s(["handler",0,T,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:N,workUnitAsyncStorage:D})},"routeModule",0,x,"serverHooks",0,P,"workAsyncStorage",0,N,"workUnitAsyncStorage",0,D],280137)},168315,e=>{e.v(t=>Promise.all(["server/chunks/0sag_@better-auth_memory-adapter_dist_index_mjs_0pvj6im._.js"].map(t=>e.l(t))).then(()=>t(862112)))},317691,e=>{e.v(t=>Promise.all(["server/chunks/0dhv_better-auth_dist_adapters_kysely-adapter_index_mjs_0t4t4z8._.js"].map(t=>e.l(t))).then(()=>t(833412)))},580632,e=>{e.v(e=>Promise.resolve().then(()=>e(270406)))},947559,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_bun-sqlite-dialect-DzNwOpKv_mjs_0z1z6m4._.js"].map(t=>e.l(t))).then(()=>t(495181)))},715018,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_node-sqlite-dialect_mjs_0qqlvhl._.js"].map(t=>e.l(t))).then(()=>t(698370)))},146843,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_d1-sqlite-dialect-C2B7YsIT_mjs_0wynrz3._.js"].map(t=>e.l(t))).then(()=>t(143740)))},84040,e=>{e.v(t=>Promise.all(["server/chunks/0p91_next_0h94sj1._.js"].map(t=>e.l(t))).then(()=>t(815068)))},427669,e=>{e.v(e=>Promise.resolve().then(()=>e(177730)))}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__09~~-nd._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[504445,e=>{"use strict";var t=e.i(750227);let r=globalThis;function a(){return r.__wikiRootDir??""}!r.__wikiRootDir&&process.env.ROOT_DIR&&(r.__wikiRootDir=t.default.resolve(process.env.ROOT_DIR)),e.s(["clearRootDir",0,function(){r.__wikiRootDir=void 0},"getRootDir",0,a,"isRootDirSet",0,function(){return!!r.__wikiRootDir},"safeRootPath",0,function(e){let r=a();if(!r)return null;if(!e||"."===e)return r;let n=t.default.resolve(r,e);return n===r||n.startsWith(r+t.default.sep)?n:null},"setRootDir",0,function(e){r.__wikiRootDir=t.default.resolve(e)}])},402662,e=>{"use strict";var t=e.i(702414);e.s(["checkOrigin",0,function(e){let r=e.method.toUpperCase();if("GET"===r||"HEAD"===r||"OPTIONS"===r)return null;let a=e.headers.get("origin"),n=e.headers.get("referer");if(!a&&!n)return null;let s=function(e){let t=Array.from(new Set(["localhost","127.0.0.1",e.split(":")[0],...(process.env.WIKI_OWNER_HOSTS??"").split(",").map(e=>e.trim()).filter(Boolean)])),r=["",":3000",":3003"];e.includes(":")&&r.push(":"+e.split(":")[1]);let a=new Set;for(let e of t)for(let t of["http","https"])for(let n of r)a.add(`${t}://${e}${n}`);return a}(e.headers.get("host")??"");if(a)return s.has(a)?null:t.NextResponse.json({error:"FORBIDDEN",message:"Bad origin"},{status:403});if(n){try{let{protocol:e,host:t}=new URL(n);if(s.has(`${e}//${t}`))return null}catch{}return t.NextResponse.json({error:"FORBIDDEN",message:"Bad referer"},{status:403})}return null}])},901280,e=>{"use strict";var t=e.i(364564),r=e.i(102095),a=e.i(691091),n=e.i(475331),s=e.i(490301),o=e.i(670943),i=e.i(690324),l=e.i(243133),u=e.i(404870),d=e.i(420180),p=e.i(867883),c=e.i(336708),h=e.i(682278),R=e.i(157569),f=e.i(844146),v=e.i(193695);e.i(105888);var _=e.i(530564),m=e.i(912714),g=e.i(750227),w=e.i(702414),E=e.i(402662),y=e.i(254226),x=e.i(504445);async function C(e){let t=(0,E.checkOrigin)(e);if(t)return t;if(!(await (0,y.requireUser)(e)).ok)return w.NextResponse.json({error:"UNAUTHORIZED"},{status:401});let r=await e.json();if(!r.from||!r.to||"string"!=typeof r.from||"string"!=typeof r.to)return w.NextResponse.json({error:"Missing from/to paths"},{status:400});let a=(0,x.safeRootPath)(r.from),n=(0,x.safeRootPath)(r.to);if(!a||!n)return w.NextResponse.json({error:"Invalid path"},{status:400});if(n.startsWith(a+g.default.sep)||n===a)return w.NextResponse.json({error:"Cannot move a folder into itself"},{status:400});try{await (0,m.stat)(a)}catch{return w.NextResponse.json({error:"Source not found"},{status:404})}try{return await (0,m.rename)(a,n),w.NextResponse.json({ok:!0})}catch{return w.NextResponse.json({error:"Move failed"},{status:500})}}e.s(["POST",0,C],428957);var N=e.i(428957);let k=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/wiki/move/route",pathname:"/api/wiki/move",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/wiki/move/route.ts",nextConfigOutput:"standalone",userland:N,...{}}),{workAsyncStorage:P,workUnitAsyncStorage:O,serverHooks:A}=k;async function T(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),k.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let m="/api/wiki/move/route";m=m.replace(/\/index$/,"")||"/";let g=await k.prepare(e,t,{srcPage:m,multiZoneDraftMode:!1});if(!g)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:w,params:E,nextConfig:y,parsedUrl:x,isDraftMode:C,prerenderManifest:N,routerServerContext:P,isOnDemandRevalidate:O,revalidateOnlyGenerated:A,resolvedPathname:T,clientReferenceManifest:D,serverActionsManifest:b}=g,j=(0,i.normalizeAppPath)(m),S=!!(N.dynamicRoutes[j]||N.routes[T]),q=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,x,!1):t.end("This page could not be found"),null);if(S&&!C){let e=!!N.routes[T],t=N.dynamicRoutes[j];if(t&&!1===t.fallback&&!e){if(y.adapterPath)return await q();throw new v.NoFallbackError}}let I=null;!S||k.isDev||C||(I="/index"===(I=T)?"/":I);let U=!0===k.isDev||!S,H=S&&!U;b&&D&&(0,o.setManifestsSingleton)({page:m,clientReferenceManifest:D,serverActionsManifest:b});let M=e.method||"GET",$=(0,s.getTracer)(),B=$.getActiveScopeSpan(),F=!!(null==P?void 0:P.isWrappedByNextServer),K=!!(0,n.getRequestMeta)(e,"minimalMode"),W=(0,n.getRequestMeta)(e,"incrementalCache")||await k.getIncrementalCache(e,y,N,K);null==W||W.resetRequestCache(),globalThis.__incrementalCache=W;let z={params:E,previewProps:N.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts},cacheComponents:!!y.cacheComponents,supportsDynamicResponse:U,incrementalCache:W,cacheLifeProfiles:y.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>k.onRequestError(e,t,a,n,P)},sharedContext:{buildId:w}},L=new l.NodeNextRequest(e),G=new l.NodeNextResponse(t),V=u.NextRequestAdapter.fromNodeNextRequest(L,(0,u.signalFromNodeResponse)(t));try{let n,o=async e=>k.handle(V,z).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${M} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${M} ${m}`)}),i=async n=>{var s,i;let l=async({previousCacheEntry:r})=>{try{if(!K&&O&&A&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await o(n);e.fetchMetrics=z.renderOpts.fetchMetrics;let i=z.renderOpts.pendingWaitUntil;i&&a.waitUntil&&(a.waitUntil(i),i=void 0);let l=z.renderOpts.collectedTags;if(!S)return await (0,c.sendResponse)(L,G,s,z.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[f.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==z.renderOpts.collectedRevalidate&&!(z.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&z.renderOpts.collectedRevalidate,a=void 0===z.renderOpts.collectedExpire||z.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:z.renderOpts.collectedExpire;return{value:{kind:_.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await k.onRequestError(e,t,{routerKind:"App Router",routePath:m,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:O})},!1,P),t}},u=await k.handleResponse({req:e,nextConfig:y,cacheKey:I,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:O,revalidateOnlyGenerated:A,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:K});if(!S)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==_.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(i=u.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});K||t.setHeader("x-nextjs-cache",O?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),C&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return K&&S||d.delete(f.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,R.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(L,G,new Response(u.value.body,{headers:d,status:u.value.status||200})),null};F&&B?await i(B):(n=$.getActiveScopeSpan(),await $.withPropagatedContext(e.headers,()=>$.trace(d.BaseServerSpan.handleRequest,{spanName:`${M} ${m}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},i),void 0,!F))}catch(t){if(t instanceof v.NoFallbackError||await k.onRequestError(e,t,{routerKind:"App Router",routePath:j,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:O})},!1,P),S)throw t;return await (0,c.sendResponse)(L,G,new Response(null,{status:500})),null}}e.s(["handler",0,T,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:P,workUnitAsyncStorage:O})},"routeModule",0,k,"serverHooks",0,A,"workAsyncStorage",0,P,"workUnitAsyncStorage",0,O],901280)},168315,e=>{e.v(t=>Promise.all(["server/chunks/0sag_@better-auth_memory-adapter_dist_index_mjs_0pvj6im._.js"].map(t=>e.l(t))).then(()=>t(862112)))},317691,e=>{e.v(t=>Promise.all(["server/chunks/0dhv_better-auth_dist_adapters_kysely-adapter_index_mjs_0t4t4z8._.js"].map(t=>e.l(t))).then(()=>t(833412)))},580632,e=>{e.v(e=>Promise.resolve().then(()=>e(270406)))},947559,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_bun-sqlite-dialect-DzNwOpKv_mjs_0z1z6m4._.js"].map(t=>e.l(t))).then(()=>t(495181)))},715018,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_node-sqlite-dialect_mjs_0qqlvhl._.js"].map(t=>e.l(t))).then(()=>t(698370)))},146843,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_d1-sqlite-dialect-C2B7YsIT_mjs_0wynrz3._.js"].map(t=>e.l(t))).then(()=>t(143740)))},84040,e=>{e.v(t=>Promise.all(["server/chunks/0p91_next_0h94sj1._.js"].map(t=>e.l(t))).then(()=>t(815068)))},427669,e=>{e.v(e=>Promise.resolve().then(()=>e(177730)))}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0w87kiz._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[504445,e=>{"use strict";var t=e.i(750227);let n=globalThis;function r(){return n.__wikiRootDir??""}!n.__wikiRootDir&&process.env.ROOT_DIR&&(n.__wikiRootDir=t.default.resolve(process.env.ROOT_DIR)),e.s(["clearRootDir",0,function(){n.__wikiRootDir=void 0},"getRootDir",0,r,"isRootDirSet",0,function(){return!!n.__wikiRootDir},"safeRootPath",0,function(e){let n=r();if(!n)return null;if(!e||"."===e)return n;let s=t.default.resolve(n,e);return s===n||s.startsWith(n+t.default.sep)?s:null},"setRootDir",0,function(e){n.__wikiRootDir=t.default.resolve(e)}])},814747,(e,t,n)=>{t.exports=e.x("path",()=>require("path"))},224361,(e,t,n)=>{t.exports=e.x("util",()=>require("util"))},688947,(e,t,n)=>{t.exports=e.x("stream",()=>require("stream"))},427699,(e,t,n)=>{t.exports=e.x("events",()=>require("events"))},228064,e=>{"use strict";var t=e.i(666680),n=e.i(912714),r=e.i(660526),s=e.i(750227),i=e.i(832852);let a="__registry__",o=new Map;function u(){let e=process.env.HOME??r.default.homedir();return s.default.join(e,".wiki-viewer")}function l(){return s.default.join(u(),"agents.json")}function c(e){return(0,t.createHash)("sha256").update(e,"utf8").digest("hex")}async function d(){try{let e=await (0,n.readFile)(l(),"utf8"),t=JSON.parse(e);return{version:1,agents:Array.isArray(t.agents)?t.agents:[]}}catch{return null}}async function p(e){await (0,n.mkdir)(u(),{recursive:!0});let t=l()+".tmp";await (0,n.writeFile)(t,JSON.stringify(e,null,2),{encoding:"utf8",mode:384});try{await (0,n.chmod)(t,384)}catch{}await (0,n.rename)(t,l())}async function f(){let e=await d();if(e)return e;let t={version:1,agents:[]};return await p(t),t}async function h(e){let n=await d();if(!n)return null;let r=c(e);for(let e of n.agents)if(function(e,n){let r=Buffer.from(e.padEnd(64,"0"),"utf8"),s=Buffer.from(n.padEnd(64,"0"),"utf8");return r.length===s.length&&(0,t.timingSafeEqual)(r,s)&&e.length===n.length}(e.tokenHash,r))return e;return null}async function m(e){await (0,i.withFileMutex)(a,async()=>{let t=await f(),n=t.agents.findIndex(t=>t.id===e.id);n>=0?t.agents[n]=e:t.agents.push(e),await p(t)})}async function g(e){return(0,i.withFileMutex)(a,async()=>{let t=await d();if(!t)return!1;let n=t.agents.length;return t.agents=t.agents.filter(t=>t.id!==e),t.agents.length!==n&&(await p(t),!0)})}async function _(e){Date.now()-(o.get(e)??0)<3e4||await (0,i.withFileMutex)(a,async()=>{let t=await d();if(!t)return;let n=t.agents.find(t=>t.id===e);n&&(n.lastSeen=new Date().toISOString(),o.set(e,Date.now()),await p(t))})}e.s(["addAgent",0,m,"hashToken",0,c,"lookupAgentByToken",0,h,"readRegistry",0,d,"removeAgent",0,g,"updateLastSeen",0,_])},215043,552350,e=>{"use strict";var t=e.i(228064);function n(e,t){return(function(e){let t="^",n=0;for(;n<e.length;)"*"===e[n]&&"*"===e[n+1]?(t+=".*","/"===e[n+=2]&&(t+="(?:.+/)?",n++)):("*"===e[n]?t+="[^/]*":"?"===e[n]?t+="[^/]":t+=e[n].replace(/[.+^${}()|[\]\\]/g,"\\$&"),n++);return new RegExp(t+="$")})(e).test(t)}e.s(["matchGlob",0,n],552350);var r=e.i(254226);async function s(e){let n=await (0,r.getSessionFromRequest)(e);if(n?.user){let e=n.user;return{ok:!0,agent:{id:`user:${e.id}`,displayName:e.name,tokenHash:"",scope:{paths:["**/*"],ops:["read","mutate"]},createdAt:"",lastSeen:""}}}let s=e.headers.get("authorization")??"",i=s.startsWith("Bearer ")?s.slice(7).trim():"";if(!i)return{ok:!1,code:"UNAUTHORIZED",message:"No credentials"};let a=await (0,t.lookupAgentByToken)(i);if(!a)return{ok:!1,code:"UNAUTHORIZED",message:"Unknown or invalid token"};let o=e.headers.get("x-agent-id")??"";return o?o!==a.id?{ok:!1,code:"UNAUTHORIZED",message:"X-Agent-Id does not match token owner"}:((0,t.updateLastSeen)(a.id),{ok:!0,agent:a}):{ok:!1,code:"UNAUTHORIZED",message:"X-Agent-Id header required"}}process.env.AGENT_BEARER_TOKEN&&console.warn("[wiki-viewer] AGENT_BEARER_TOKEN is no longer used; manage agents via the AI Panel."),e.s(["checkAuth",0,s,"enforceScope",0,function(e,t){let{scope:r}=e;return r.ops.includes(t.op)?t.filePath&&!r.paths.some(e=>n(e,t.filePath))?{ok:!1,code:"FORBIDDEN",message:`Agent scope does not cover path "${t.filePath}"`}:{ok:!0}:{ok:!1,code:"FORBIDDEN",message:`Agent scope does not allow "${t.op}"`}},"verifyBy",0,function(e,t){return e.id.startsWith("user:")?!t||"owner"===t||"human"===t||t.startsWith("human:")||t===e.id?{ok:!0}:{ok:!1,code:"FORBIDDEN",message:'User agent must use "human", "owner", or own id in "by" field'}:t!==e.id?{ok:!1,code:"FORBIDDEN",message:`"by" field must equal agent id "${e.id}"`}:{ok:!0}}],215043)},973909,e=>{"use strict";var t=e.i(912714),n=e.i(750227);function r(e,t){return n.default.join(e,".proof",t+".json")}async function s(e,n){let s=r(e,n);try{let e=await (0,t.readFile)(s,"utf-8"),n=JSON.parse(e);if(1!==n.schemaVersion)throw Error(`Sidecar schema version mismatch: expected 1, got ${n.schemaVersion}`);return n}catch(e){if(e instanceof Error&&"code"in e&&"ENOENT"===e.code)return null;throw e}}async function i(e,s,i){let a=r(e,s);await (0,t.mkdir)(n.default.dirname(a),{recursive:!0});let o=a+".tmp";await (0,t.writeFile)(o,JSON.stringify(i,null,2),"utf-8"),await (0,t.rename)(o,a)}e.s(["emptySidecar",0,function(e){let t=new Date().toISOString();return{schemaVersion:1,path:e,revision:0,createdAt:t,updatedAt:t,refMap:{},refAliases:{},comments:[],suggestions:[],archivedSuggestions:[],events:[],nextEventId:1,lastAck:{},fingerprint:"",blockProvenance:{}}},"readSidecar",0,s,"writeSidecar",0,i])},307764,e=>{"use strict";e.s(["emitEvents",0,function(e,t){let n=[];for(let r of t){let t={...r,id:e.nextEventId++};e.events.push(t),n.push(t)}return n},"pollEvents",0,function(e,t,n){return e.events.filter(e=>e.id>t).slice(0,n)},"trimEvents",0,function(e,t){if(e.events.length<=t)return;let n=Object.values(e.lastAck),r=n.length>0?Math.min(...n):1/0,s=e.events.length-t,i=e.events.filter((e,t)=>t>=s||e.id>r);e.events=i}])},794776,e=>{"use strict";let t,n=Number.isFinite(t=parseInt(process.env.AGENT_RATE_LIMIT??"",10))&&t>0?t:60;e.s(["OPS_PER_MINUTE",0,n,"SIDECAR_EVENT_TRIM_SIZE",0,1e3,"SIDECAR_TRIM_EVERY_N_MUTATIONS",0,100])},857764,(e,t,n)=>{t.exports=e.x("node:url",()=>require("node:url"))},59639,(e,t,n)=>{t.exports=e.x("node:process",()=>require("node:process"))},462711,651212,316552,e=>{"use strict";var t=e.i(750227);e.s(["minpath",()=>t.default],462711);var n=e.i(59639);e.s(["minproc",()=>n.default],651212);var r=e.i(857764);e.s(["urlToPath",()=>r.fileURLToPath],316552)},850948,e=>{"use strict";function t(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;")}e.s(["newSpanId",0,function(){let e=Math.floor(65535*Math.random()).toString(16).padStart(4,"0");return`p${e}`},"revertProofSpan",0,function(e,t){let n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=RegExp(`<proof-span\\b[^>]*\\bid="${n}"[^>]*>[\\s\\S]*?<\\/proof-span>`,"g");return e.replace(r,"")},"wrapAsProofSpan",0,function(e,n){let r,s=(r=[`id="${t(n.spanId)}"`,`origin="${n.origin}"`],n.basis&&r.push(`basis="${t(n.basis)}"`),n.basisDetail&&r.push(`basis-detail="${t(n.basisDetail)}"`),r.push(`by="${t(n.by)}"`),r.push(`at="${t(n.at)}"`),n.inResponseTo&&r.push(`in-response-to="${t(n.inResponseTo)}"`),r.join(" ")),i=e.trim();if(i.startsWith("```")||i.startsWith("~~~")||i.startsWith("<")&&!i.startsWith("<proof-span")||/^[-*_]{3,}\s*$/.test(i))return null;let a=i.split("\n")[0];if(a.includes("|")&&/^\|.*\|/.test(a))return null;let o=i.match(/^(#{1,6})\s+(.+)$/);if(o){let e=o[1],t=o[2].trimEnd();return`${e} <proof-span ${s}>${t}</proof-span>`}return i.startsWith(">")?i.split("\n").map(e=>{let t=e.match(/^(>\s?)(.*)/);if(!t)return e;let n=t[1],r=t[2];return r.trim()?`${n}<proof-span ${s}>${r}</proof-span>`:e}).join("\n"):/^(\s*(?:[-*+]|\d+\.)\s+(?:\[[ xX]\]\s+)?)(.*)/.test(i.split("\n")[0])?i.split("\n").map(e=>{let t=e.match(/^(\s*(?:[-*+]|\d+\.)\s+(?:\[[ xX]\]\s+)?)(.*)/);if(!t)return e;let n=t[1],r=t[2];return r.trim()?`${n}<proof-span ${s}>${r}</proof-span>`:e}).join("\n"):`<proof-span ${s}>${i}</proof-span>`}])},168315,e=>{e.v(t=>Promise.all(["server/chunks/0sag_@better-auth_memory-adapter_dist_index_mjs_0pvj6im._.js"].map(t=>e.l(t))).then(()=>t(862112)))},317691,e=>{e.v(t=>Promise.all(["server/chunks/0dhv_better-auth_dist_adapters_kysely-adapter_index_mjs_0t4t4z8._.js"].map(t=>e.l(t))).then(()=>t(833412)))},580632,e=>{e.v(e=>Promise.resolve().then(()=>e(270406)))},947559,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_bun-sqlite-dialect-DzNwOpKv_mjs_0z1z6m4._.js"].map(t=>e.l(t))).then(()=>t(495181)))},715018,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_node-sqlite-dialect_mjs_0qqlvhl._.js"].map(t=>e.l(t))).then(()=>t(698370)))},146843,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_d1-sqlite-dialect-C2B7YsIT_mjs_0wynrz3._.js"].map(t=>e.l(t))).then(()=>t(143740)))},84040,e=>{e.v(t=>Promise.all(["server/chunks/0p91_next_0h94sj1._.js"].map(t=>e.l(t))).then(()=>t(815068)))},427669,e=>{e.v(e=>Promise.resolve().then(()=>e(177730)))}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__12ssbhv._.js.map