wiki-viewer 2.19.0 → 2.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +1 -0
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +1 -1
- package/.next/standalone/.next/routes-manifest.json +6 -0
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agent/activity/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/admin/registrations/[regId]/approve/route.js +6 -6
- package/.next/standalone/.next/server/app/api/agent/admin/registrations/[regId]/approve/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/events/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/files/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/file/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/ls/[[...path]]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/move/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/register/route.js +4 -3
- package/.next/standalone/.next/server/app/api/agent/register/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/settings/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/sidecar/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agents/install/route.js +3 -2
- package/.next/standalone/.next/server/app/api/agents/install/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agents/skill/route.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/skill/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agents/skill.tar.gz/route.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/skill.tar.gz/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/app-proxy/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/assets/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/[...all]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/[...all]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/pdf/save/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/share/[token]/asset/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/share/[token]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/share/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/browse/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/reveal/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/service-token/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/system/service-token/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/system/service-token/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/system/service-token/route.js +14 -0
- package/.next/standalone/.next/server/app/api/system/service-token/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/system/service-token/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/system/service-token/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/branch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/open/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/refresh/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/upload/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/app/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/backlinks/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/content/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/download/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/folder/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-branches/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-checkout/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-diff/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-file-info/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-history/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-pull/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/hosted-apps/[slug]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/hosted-apps/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/move/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/new-file/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/outlinks/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/page/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/presence/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/scratch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/slugs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/upload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/watch/route.js +1 -1
- package/.next/standalone/.next/server/app/api/wiki/watch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/app/[slug]/[[...rest]]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/s/[token]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/signin/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +1 -0
- package/.next/standalone/.next/server/chunks/0.u4_next_dist_esm_build_templates_app-route_0.4w~2_.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01aj28~._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0t791y_._.js → [root-of-the-server]__04askqq._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0cjpldw._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0qpqspq._.js → [root-of-the-server]__0cv6uhs._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0dya7sd._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0f_hd-p._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0puvgme._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~a6cyg._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__13lwpvb._.js +3 -0
- package/.next/standalone/.next/server/chunks/_079xuln._.js +1 -1
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_system_service-token_route_actions_0~0qkgh.js +3 -0
- package/.next/standalone/.next/server/chunks/src_04l.j6s._.js +3 -0
- package/.next/standalone/.next/server/chunks/src_lib_auth_server_ts_00f4e0h._.js +25 -25
- package/.next/standalone/.next/server/chunks/ssr/{0~w0_katex_dist_katex_mjs_0gr6q1f._.js → 0~w0_katex_dist_katex_mjs_02b4pv0._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__02.v5th._.js → [root-of-the-server]__05fw4nf._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0k6g8yo._.js +12 -9
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_05tvs.j._.js → node_modules__pnpm_0-9pgc-._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_052119m._.js → node_modules__pnpm_0.b-q-g._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0nqllnp._.js → node_modules__pnpm_004esp.._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_1057jq-._.js → node_modules__pnpm_00d_ihj._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_04h3f7z._.js → node_modules__pnpm_018bmrp._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0yo568y._.js → node_modules__pnpm_02j29jd._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0z3_de6._.js → node_modules__pnpm_04e8oap._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0ev5rtd._.js → node_modules__pnpm_06xedp9._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_10e264.._.js → node_modules__pnpm_08aserg._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0gg_t7m._.js → node_modules__pnpm_09cnu2l._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0s6od3y._.js → node_modules__pnpm_0b9mrd-._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_02t6.-b._.js → node_modules__pnpm_0d.7f.v._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_06lzn3f._.js → node_modules__pnpm_0dm-.3s._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_04aul6b._.js → node_modules__pnpm_0eo2ac8._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0fekgqt._.js → node_modules__pnpm_0f.-l_i._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0aczw13._.js → node_modules__pnpm_0gdk9ii._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0~sf~oy._.js → node_modules__pnpm_0ibh1jm._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0xp1-db._.js → node_modules__pnpm_0jn81p-._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0gwfulm._.js → node_modules__pnpm_0lwio3d._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0bjukfc._.js → node_modules__pnpm_0oqqt~3._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0_mroc7._.js → node_modules__pnpm_0t_97nv._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_05k6a~v._.js → node_modules__pnpm_0u~ng-b._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0ywyhqr._.js → node_modules__pnpm_0va2k-t._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0rzgcz4._.js → node_modules__pnpm_0ye5zu~._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0ldy4q8._.js → node_modules__pnpm_0zhmzqf._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0l8oa7o._.js → node_modules__pnpm_131~6_2._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0tqhmaj._.js → node_modules__pnpm_13i2f82._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_signin_00yk0vm._.js +1 -1
- package/.next/standalone/.next/server/functions-config-manifest.json +1 -0
- package/.next/standalone/.next/server/instrumentation.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/0o.-s7.m.hhct.css +1 -0
- package/.next/standalone/.next/static/chunks/0x082gn2hhbex.js +188 -0
- package/.next/standalone/isometric-codebase-map.html +2 -2
- package/.next/standalone/isometric-codebase-map.json +3 -3
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/scripts/clean-auth-test-users.mjs +68 -0
- package/.next/standalone/server.js +1 -1
- package/README.md +0 -3
- package/package.json +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.ws67e._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0blum8f._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d42en0._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0j8ch6d._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0x5g3v_._.js +0 -3
- package/.next/standalone/.next/server/chunks/src_0pwns~4._.js +0 -3
- package/.next/standalone/.next/static/chunks/04ty7tw4dnejo.css +0 -1
- package/.next/standalone/.next/static/chunks/17had1~xdp8yg.js +0 -185
- /package/.next/standalone/.next/static/{_Twg2JLOx3LXPmY9EbBt- → ch24XdB6w4ERJnCBxzvzW}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{_Twg2JLOx3LXPmY9EbBt- → ch24XdB6w4ERJnCBxzvzW}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{_Twg2JLOx3LXPmY9EbBt- → ch24XdB6w4ERJnCBxzvzW}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},100705,(e,t,r)=>{"use strict";t.exports=e.r(918622)},294382,(e,t,r)=>{"use strict";t.exports=e.r(100705).vendored["react-rsc"].React},362744,(e,t,r)=>{"use strict";var i=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o={},l={RequestCookies:()=>g,ResponseCookies:()=>h,parseCookie:()=>c,parseSetCookie:()=>p,stringifyCookie:()=>d};for(var u in l)i(o,u,{get:l[u],enumerable:!0});function d(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),i=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?i:`${i}; ${r.join("; ")}`}function c(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[i,n]=[r.slice(0,e),r.slice(e+1)];try{t.set(i,decodeURIComponent(null!=n?n:"true"))}catch{}}return t}function p(e){if(!e)return;let[[t,r],...i]=c(e),{domain:n,expires:s,httponly:a,maxage:o,path:l,samesite:u,secure:d,partitioned:p,priority:g}=Object.fromEntries(i.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var h,y,b={name:t,value:decodeURIComponent(r),domain:n,...s&&{expires:new Date(s)},...a&&{httpOnly:!0},..."string"==typeof o&&{maxAge:Number(o)},path:l,...u&&{sameSite:m.includes(h=(h=u).toLowerCase())?h:void 0},...d&&{secure:!0},...g&&{priority:f.includes(y=(y=g).toLowerCase())?y:void 0},...p&&{partitioned:!0}};let e={};for(let t in b)b[t]&&(e[t]=b[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of s(t))a.call(e,o)||void 0===o||i(e,o,{get:()=>t[o],enumerable:!(r=n(t,o))||r.enumerable});return e})(i({},"__esModule",{value:!0}),o);var m=["strict","lax","none"],f=["low","medium","high"],g=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of c(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let i="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===i).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,i=this._parsed;return i.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(i).map(([e,t])=>d(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>d(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},h=class{constructor(e){var t,r,i;this._parsed=new Map,this._headers=e;const n=null!=(i=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?i:[];for(const e of Array.isArray(n)?n:function(e){if(!e)return[];var t,r,i,n,s,a=[],o=0;function l(){for(;o<e.length&&/\s/.test(e.charAt(o));)o+=1;return o<e.length}for(;o<e.length;){for(t=o,s=!1;l();)if(","===(r=e.charAt(o))){for(i=o,o+=1,l(),n=o;o<e.length&&"="!==(r=e.charAt(o))&&";"!==r&&","!==r;)o+=1;o<e.length&&"="===e.charAt(o)?(s=!0,o=n,a.push(e.substring(t,i)),t=o):o=i+1}else o+=1;(!s||o>=e.length)&&a.push(e.substring(t,e.length))}return a}(n)){const t=p(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let i="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===i)}has(e){return this._parsed.has(e)}set(...e){let[t,r,i]=1===e.length?[e[0].name,e[0].value,e[0]]:e,n=this._parsed;return n.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...i})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=d(r);t.append("set-cookie",e)}}(n,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(d).join("; ")}}},912714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},478500,(e,t,r)=>{t.exports=e.x("node:async_hooks",()=>require("node:async_hooks"))},666680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},750227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},902157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},660526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},798003,e=>{"use strict";var t=e.i(912714),r=e.i(660526),i=e.i(750227);function n(){return i.default.join(r.default.homedir(),".wiki-viewer","config.json")}async function s(){let e=i.default.join(r.default.homedir(),".wiki-viewer");await (0,t.mkdir)(e,{recursive:!0,mode:448});try{await (0,t.chmod)(e,448)}catch{}}async function a(){try{let e=await (0,t.readFile)(n(),"utf8");return JSON.parse(e)}catch{return{}}}let o=Promise.resolve();function l(e){let t=o.then(e,e);return o=t.then(()=>void 0,()=>void 0),t}async function u(e){await s(),await (0,t.writeFile)(n(),JSON.stringify(e,null,2),{encoding:"utf8",mode:384});try{await (0,t.chmod)(n(),384)}catch{}}async function d(e){return l(async()=>{let t=await a();await u({...t,...e})})}async function c(e){return l(async()=>{let t=e({...await a()});return await u(t),t})}e.s(["readConfig",0,a,"reposDir",0,function(){return i.default.join(r.default.homedir(),".wiki-viewer","repos")},"updateConfig",0,c,"writeConfig",0,d])},588772,e=>{"use strict";e.s(["DialectAdapterBase",0,class{get supportsCreateIfNotExists(){return!0}get supportsTransactionalDdl(){return!1}get supportsReturning(){return!1}get supportsOutput(){return!1}}])},733162,e=>{"use strict";var t=e.i(264116);let r=/"/g;class i extends t.DefaultQueryCompiler{visitOrAction(e){this.append("or "),this.append(e.action)}getCurrentParameterPlaceholder(){return"?"}getLeftExplainOptionsWrapper(){return""}getRightExplainOptionsWrapper(){return""}getLeftIdentifierWrapper(){return'"'}getRightIdentifierWrapper(){return'"'}getAutoIncrement(){return"autoincrement"}sanitizeIdentifier(e){return e.replace(r,'""')}visitDefaultInsertValue(e){this.append("null")}}e.s(["SqliteQueryCompiler",0,i])},285675,e=>{"use strict";var t=e.i(588772);class r extends t.DialectAdapterBase{get supportsTransactionalDdl(){return!1}get supportsReturning(){return!0}async acquireMigrationLock(e,t){}async releaseMigrationLock(e,t){}}e.s(["SqliteAdapter",0,r])},313414,e=>{"use strict";var t=e.i(563811),r=e.i(560912),i=e.i(877727),n=e.i(429513),s=e.i(169726),a=e.i(547756);let o={postgres:{string:["character varying","varchar","text","uuid"],number:["int4","integer","bigint","smallint","numeric","real","double precision"],boolean:["bool","boolean"],date:["timestamptz","timestamp","date"],json:["json","jsonb"]},mysql:{string:["varchar","text","uuid"],number:["integer","int","bigint","smallint","decimal","float","double"],boolean:["boolean","tinyint"],date:["timestamp","datetime","date"],json:["json"]},sqlite:{string:["TEXT"],number:["INTEGER","REAL"],boolean:["INTEGER","BOOLEAN"],date:["DATE","INTEGER"],json:["TEXT"]},mssql:{string:["varchar","nvarchar","uniqueidentifier"],number:["int","bigint","smallint","decimal","float","double"],boolean:["bit","smallint"],date:["datetime2","date","datetime"],json:["varchar","nvarchar"]}};function l(e,t,r){if("string[]"===t||"number[]"===t)return e.toLowerCase().includes("json");let i=o[r];return(Array.isArray(t)?i.string.map(e=>e.toLowerCase()):i[t].map(e=>e.toLowerCase())).includes(e.toLowerCase().split("(")[0].trim())}async function u(e){try{let t=await a.sql`SHOW search_path`.execute(e),r=t.rows[0]?.search_path??t.rows[0]?.searchPath;if(r)return r.split(",").map(e=>e.trim()).map(e=>e.replace(/^["']|["']$/g,"")).filter(e=>!e.startsWith("$")&&!e.startsWith("\\$"))[0]||"public"}catch{}return"public"}async function d(e){let o=function(e){let r=(0,t.getAuthTables)(e),i={};for(let e in r){let t=r[e],n=t.fields,s={};if(Object.entries(n).forEach(([e,t])=>{if(s[t.fieldName||e]=t,t.references){let i=r[t.references.model];i&&(s[t.fieldName||e].references={...t.references,model:i.modelName,field:t.references.field})}}),i[t.modelName]){i[t.modelName].fields={...i[t.modelName].fields,...s};continue}i[t.modelName]={fields:s,order:t.order||1/0}}return i}(e),d=(0,r.createLogger)(e.logger),{kysely:c,databaseType:p}=await (0,i.createKyselyAdapter)(e);p||(d.warn("Could not determine database type, defaulting to sqlite. Please provide a type in the database options to avoid this."),p="sqlite"),c||(d.error("Only kysely adapter is supported for migrations. You can use `generate` command to generate the schema, if you're using a different adapter."),process.exit(1));let m="public";if("postgres"===p){m=await u(c),d.debug(`PostgreSQL migration: Using schema '${m}' (from search_path)`);try{let e=await a.sql`
|
|
1
|
+
module.exports=[918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},100705,(e,t,r)=>{"use strict";t.exports=e.r(918622)},294382,(e,t,r)=>{"use strict";t.exports=e.r(100705).vendored["react-rsc"].React},362744,(e,t,r)=>{"use strict";var i=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o={},l={RequestCookies:()=>g,ResponseCookies:()=>h,parseCookie:()=>c,parseSetCookie:()=>p,stringifyCookie:()=>d};for(var u in l)i(o,u,{get:l[u],enumerable:!0});function d(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),i=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?i:`${i}; ${r.join("; ")}`}function c(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[i,n]=[r.slice(0,e),r.slice(e+1)];try{t.set(i,decodeURIComponent(null!=n?n:"true"))}catch{}}return t}function p(e){if(!e)return;let[[t,r],...i]=c(e),{domain:n,expires:s,httponly:a,maxage:o,path:l,samesite:u,secure:d,partitioned:p,priority:g}=Object.fromEntries(i.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var h,y,b={name:t,value:decodeURIComponent(r),domain:n,...s&&{expires:new Date(s)},...a&&{httpOnly:!0},..."string"==typeof o&&{maxAge:Number(o)},path:l,...u&&{sameSite:m.includes(h=(h=u).toLowerCase())?h:void 0},...d&&{secure:!0},...g&&{priority:f.includes(y=(y=g).toLowerCase())?y:void 0},...p&&{partitioned:!0}};let e={};for(let t in b)b[t]&&(e[t]=b[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of s(t))a.call(e,o)||void 0===o||i(e,o,{get:()=>t[o],enumerable:!(r=n(t,o))||r.enumerable});return e})(i({},"__esModule",{value:!0}),o);var m=["strict","lax","none"],f=["low","medium","high"],g=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of c(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let i="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===i).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,i=this._parsed;return i.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(i).map(([e,t])=>d(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>d(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},h=class{constructor(e){var t,r,i;this._parsed=new Map,this._headers=e;const n=null!=(i=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?i:[];for(const e of Array.isArray(n)?n:function(e){if(!e)return[];var t,r,i,n,s,a=[],o=0;function l(){for(;o<e.length&&/\s/.test(e.charAt(o));)o+=1;return o<e.length}for(;o<e.length;){for(t=o,s=!1;l();)if(","===(r=e.charAt(o))){for(i=o,o+=1,l(),n=o;o<e.length&&"="!==(r=e.charAt(o))&&";"!==r&&","!==r;)o+=1;o<e.length&&"="===e.charAt(o)?(s=!0,o=n,a.push(e.substring(t,i)),t=o):o=i+1}else o+=1;(!s||o>=e.length)&&a.push(e.substring(t,e.length))}return a}(n)){const t=p(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let i="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===i)}has(e){return this._parsed.has(e)}set(...e){let[t,r,i]=1===e.length?[e[0].name,e[0].value,e[0]]:e,n=this._parsed;return n.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...i})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=d(r);t.append("set-cookie",e)}}(n,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(d).join("; ")}}},478500,(e,t,r)=>{t.exports=e.x("node:async_hooks",()=>require("node:async_hooks"))},912714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},666680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},750227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},902157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},660526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},798003,e=>{"use strict";var t=e.i(912714),r=e.i(660526),i=e.i(750227);function n(){return i.default.join(r.default.homedir(),".wiki-viewer","config.json")}async function s(){let e=i.default.join(r.default.homedir(),".wiki-viewer");await (0,t.mkdir)(e,{recursive:!0,mode:448});try{await (0,t.chmod)(e,448)}catch{}}async function a(){try{let e=await (0,t.readFile)(n(),"utf8");return JSON.parse(e)}catch{return{}}}let o=Promise.resolve();function l(e){let t=o.then(e,e);return o=t.then(()=>void 0,()=>void 0),t}async function u(e){await s(),await (0,t.writeFile)(n(),JSON.stringify(e,null,2),{encoding:"utf8",mode:384});try{await (0,t.chmod)(n(),384)}catch{}}async function d(e){return l(async()=>{let t=await a();await u({...t,...e})})}async function c(e){return l(async()=>{let t=e({...await a()});return await u(t),t})}e.s(["readConfig",0,a,"reposDir",0,function(){return i.default.join(r.default.homedir(),".wiki-viewer","repos")},"updateConfig",0,c,"writeConfig",0,d])},588772,e=>{"use strict";e.s(["DialectAdapterBase",0,class{get supportsCreateIfNotExists(){return!0}get supportsTransactionalDdl(){return!1}get supportsReturning(){return!1}get supportsOutput(){return!1}}])},733162,e=>{"use strict";var t=e.i(264116);let r=/"/g;class i extends t.DefaultQueryCompiler{visitOrAction(e){this.append("or "),this.append(e.action)}getCurrentParameterPlaceholder(){return"?"}getLeftExplainOptionsWrapper(){return""}getRightExplainOptionsWrapper(){return""}getLeftIdentifierWrapper(){return'"'}getRightIdentifierWrapper(){return'"'}getAutoIncrement(){return"autoincrement"}sanitizeIdentifier(e){return e.replace(r,'""')}visitDefaultInsertValue(e){this.append("null")}}e.s(["SqliteQueryCompiler",0,i])},285675,e=>{"use strict";var t=e.i(588772);class r extends t.DialectAdapterBase{get supportsTransactionalDdl(){return!1}get supportsReturning(){return!0}async acquireMigrationLock(e,t){}async releaseMigrationLock(e,t){}}e.s(["SqliteAdapter",0,r])},313414,e=>{"use strict";var t=e.i(563811),r=e.i(560912),i=e.i(877727),n=e.i(429513),s=e.i(169726),a=e.i(547756);let o={postgres:{string:["character varying","varchar","text","uuid"],number:["int4","integer","bigint","smallint","numeric","real","double precision"],boolean:["bool","boolean"],date:["timestamptz","timestamp","date"],json:["json","jsonb"]},mysql:{string:["varchar","text","uuid"],number:["integer","int","bigint","smallint","decimal","float","double"],boolean:["boolean","tinyint"],date:["timestamp","datetime","date"],json:["json"]},sqlite:{string:["TEXT"],number:["INTEGER","REAL"],boolean:["INTEGER","BOOLEAN"],date:["DATE","INTEGER"],json:["TEXT"]},mssql:{string:["varchar","nvarchar","uniqueidentifier"],number:["int","bigint","smallint","decimal","float","double"],boolean:["bit","smallint"],date:["datetime2","date","datetime"],json:["varchar","nvarchar"]}};function l(e,t,r){if("string[]"===t||"number[]"===t)return e.toLowerCase().includes("json");let i=o[r];return(Array.isArray(t)?i.string.map(e=>e.toLowerCase()):i[t].map(e=>e.toLowerCase())).includes(e.toLowerCase().split("(")[0].trim())}async function u(e){try{let t=await a.sql`SHOW search_path`.execute(e),r=t.rows[0]?.search_path??t.rows[0]?.searchPath;if(r)return r.split(",").map(e=>e.trim()).map(e=>e.replace(/^["']|["']$/g,"")).filter(e=>!e.startsWith("$")&&!e.startsWith("\\$"))[0]||"public"}catch{}return"public"}async function d(e){let o=function(e){let r=(0,t.getAuthTables)(e),i={};for(let e in r){let t=r[e],n=t.fields,s={};if(Object.entries(n).forEach(([e,t])=>{if(s[t.fieldName||e]=t,t.references){let i=r[t.references.model];i&&(s[t.fieldName||e].references={...t.references,model:i.modelName,field:t.references.field})}}),i[t.modelName]){i[t.modelName].fields={...i[t.modelName].fields,...s};continue}i[t.modelName]={fields:s,order:t.order||1/0}}return i}(e),d=(0,r.createLogger)(e.logger),{kysely:c,databaseType:p}=await (0,i.createKyselyAdapter)(e);p||(d.warn("Could not determine database type, defaulting to sqlite. Please provide a type in the database options to avoid this."),p="sqlite"),c||(d.error("Only kysely adapter is supported for migrations. You can use `generate` command to generate the schema, if you're using a different adapter."),process.exit(1));let m="public";if("postgres"===p){m=await u(c),d.debug(`PostgreSQL migration: Using schema '${m}' (from search_path)`);try{let e=await a.sql`
|
|
2
2
|
SELECT schema_name
|
|
3
3
|
FROM information_schema.schemata
|
|
4
4
|
WHERE schema_name = ${m}
|
|
@@ -9,4 +9,4 @@ module.exports=[918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/a
|
|
|
9
9
|
AND table_type = 'BASE TABLE'
|
|
10
10
|
`.execute(c),t=new Set(e.rows.map(e=>e.table_name??e.tableName));g=f.filter(e=>e.schema===m&&t.has(e.name)),d.debug(`Found ${g.length} table(s) in schema '${m}': ${g.map(e=>e.name).join(", ")||"(none)"}`)}catch(e){d.warn(`Could not filter tables by schema. Using all discovered tables. Error: ${e instanceof Error?e.message:String(e)}`)}let h=[],y=[];for(let[e,t]of Object.entries(o)){let r=g.find(t=>t.name===e);if(!r){let r=h.findIndex(t=>t.table===e),i={table:e,fields:t.fields,order:t.order||1/0},n=h.findIndex(e=>(e.order||1/0)>i.order);-1===n?-1===r?h.push(i):h[r].fields={...h[r].fields,...t.fields}:h.splice(n,0,i);continue}let i={};for(let[n,s]of Object.entries(t.fields)){let t=r.columns.find(e=>e.name===n);if(!t){i[n]=s;continue}l(t.dataType,s.type,p)||d.warn(`Field ${n} in table ${e} has a different type in the database. Expected ${s.type} but got ${t.dataType}.`)}Object.keys(i).length>0&&y.push({table:e,fields:i,order:t.order||1/0})}let b=[],x=e.advanced?.database?.generateId==="uuid",q=e.advanced?.database?.generateId==="serial";function v(e,t){let r=e.type,i=p||"sqlite",n={string:{sqlite:"text",postgres:"text",mysql:e.unique?"varchar(255)":e.references?"varchar(36)":e.sortable||e.index?"varchar(255)":"text",mssql:e.unique||e.sortable?"varchar(255)":e.references?"varchar(36)":"varchar(8000)"},boolean:{sqlite:"integer",postgres:"boolean",mysql:"boolean",mssql:"smallint"},number:{sqlite:e.bigint?"bigint":"integer",postgres:e.bigint?"bigint":"integer",mysql:e.bigint?"bigint":"integer",mssql:e.bigint?"bigint":"integer"},date:{sqlite:"date",postgres:"timestamptz",mysql:"timestamp(3)",mssql:a.sql`datetime2(3)`},json:{sqlite:"text",postgres:"jsonb",mysql:"json",mssql:"varchar(8000)"},id:{postgres:q?a.sql`integer GENERATED BY DEFAULT AS IDENTITY`:x?"uuid":"text",mysql:q?"integer":"varchar(36)",mssql:q?"integer":"varchar(36)",sqlite:q?"integer":"text"},foreignKeyId:{postgres:q?"integer":x?"uuid":"text",mysql:q?"integer":"varchar(36)",mssql:q?"integer":"varchar(36)",sqlite:q?"integer":"text"},"string[]":{sqlite:"text",postgres:"jsonb",mysql:"json",mssql:"varchar(8000)"},"number[]":{sqlite:"text",postgres:"jsonb",mysql:"json",mssql:"varchar(8000)"}};if("id"===t||e.references?.field==="id")return"id"===t?n.id[i]:n.foreignKeyId[i];if(Array.isArray(r))return"text";if(!(r in n))throw Error(`Unsupported field type '${String(r)}' for field '${t}'. Allowed types are: string, number, boolean, date, string[], number[]. If you need to store structured data, store it as a JSON string (type: "string") or split it into primitive fields. See https://better-auth.com/docs/advanced/schema#additional-fields`);return n[r][i]}let w=(0,s.initGetModelName)({schema:(0,t.getAuthTables)(e),usePlural:!1}),_=(0,n.initGetFieldName)({schema:(0,t.getAuthTables)(e),usePlural:!1});function A(e,t){try{return`${w(e)}.${_({model:e,field:t})}`}catch{return`${e}.${t}`}}let j=[];if(y.length)for(let e of y)for(let[t,r]of Object.entries(e.fields)){let i=v(r,t),n=c.schema.alterTable(e.table);if(r.index){let i=`${e.table}_${t}_${r.unique?"uidx":"idx"}`,n=c.schema.createIndex(i).on(e.table).columns([t]);j.push(r.unique?n.unique():n)}let s=n.addColumn(t,i,e=>(e=!1!==r.required?e.notNull():e,r.references&&(e=e.references(A(r.references.model,r.references.field)).onDelete(r.references.onDelete||"cascade")),r.unique&&(e=e.unique()),"date"===r.type&&"function"==typeof r.defaultValue&&("postgres"===p||"mysql"===p||"mssql"===p)&&(e="mysql"===p?e.defaultTo(a.sql`CURRENT_TIMESTAMP(3)`):e.defaultTo(a.sql`CURRENT_TIMESTAMP`)),e));b.push(s)}if(h.length)for(let e of h){let t=v({type:q?"number":"string"},"id"),r=c.schema.createTable(e.table).addColumn("id",t,e=>{if(q)return"postgres"===p?e.primaryKey().notNull():"sqlite"===p?e.primaryKey().notNull():"mssql"===p?e.identity().primaryKey().notNull():e.autoIncrement().primaryKey().notNull();return x&&"postgres"===p?e.primaryKey().defaultTo(a.sql`pg_catalog.gen_random_uuid()`).notNull():e.primaryKey().notNull()});for(let[t,i]of Object.entries(e.fields)){let n=v(i,t);if(r=r.addColumn(t,n,e=>(e=!1!==i.required?e.notNull():e,i.references&&(e=e.references(A(i.references.model,i.references.field)).onDelete(i.references.onDelete||"cascade")),i.unique&&(e=e.unique()),"date"===i.type&&"function"==typeof i.defaultValue&&("postgres"===p||"mysql"===p||"mssql"===p)&&(e="mysql"===p?e.defaultTo(a.sql`CURRENT_TIMESTAMP(3)`):e.defaultTo(a.sql`CURRENT_TIMESTAMP`)),e)),i.index){let r=c.schema.createIndex(`${e.table}_${t}_${i.unique?"uidx":"idx"}`).on(e.table).columns([t]);j.push(i.unique?r.unique():r)}}b.push(r)}for(let e of j)b.push(e);return{toBeCreated:h,toBeAdded:y,runMigrations:async function(){for(let e of b)await e.execute()},compileMigrations:async function(){return b.map(e=>e.compile().sql).join(";\n\n")+";"}}}e.s(["getMigrations",0,d,"matchType",0,l],313414)}];
|
|
11
11
|
|
|
12
|
-
//# sourceMappingURL=%5Broot-of-the-server%
|
|
12
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__04askqq._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[402662,e=>{"use strict";var t=e.i(351216);e.s(["checkOrigin",0,function(e){let r=e.method.toUpperCase();if("GET"===r||"HEAD"===r||"OPTIONS"===r)return null;let n=e.headers.get("origin"),a=e.headers.get("referer");if(!n&&!a)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 n=new Set;for(let e of t)for(let t of["http","https"])for(let a of r)n.add(`${t}://${e}${a}`);return n}(e.headers.get("host")??"");if(n)return s.has(n)?null:t.NextResponse.json({error:"FORBIDDEN",message:"Bad origin"},{status:403});if(a){try{let{protocol:e,host:t}=new URL(a);if(s.has(`${e}//${t}`))return null}catch{}return t.NextResponse.json({error:"FORBIDDEN",message:"Bad referer"},{status:403})}return null}])},563851,e=>{"use strict";var t=e.i(750227),r=e.i(660526),n=e.i(902157),a=e.i(666680);let s=()=>t.default.join(process.env.HOME??r.default.homedir(),".wiki-viewer","service-token");function i(){return(0,n.existsSync)(s())?(0,n.readFileSync)(s(),"utf-8").trim():""}e.s(["getServiceToken",0,i,"isServiceTokenRequest",0,function(e){let t=e.headers.get("x-service-token")?.trim()??"";return t.length>0&&function(e){let t=i();if(!t||!e||t.length!==e.length)return!1;try{return(0,a.timingSafeEqual)(Buffer.from(t,"utf-8"),Buffer.from(e,"utf-8"))}catch{return!1}}(t)},"rotateServiceToken",0,function(){(0,n.mkdirSync)(t.default.dirname(s()),{recursive:!0});let e=`wv_svc_${(0,a.randomBytes)(32).toString("hex")}`;(0,n.writeFileSync)(s(),e,{mode:384});try{(0,n.chmodSync)(s(),384)}catch{}return e}])},458321,e=>{"use strict";var t=e.i(985426),r=e.i(257574),n=e.i(507835),a=e.i(457789),s=e.i(119791),i=e.i(141062),o=e.i(957291),l=e.i(535899),u=e.i(610241),d=e.i(62749),c=e.i(624891),p=e.i(725836),h=e.i(532736),v=e.i(257858),m=e.i(487476),f=e.i(193695);e.i(484264);var R=e.i(315709),_=e.i(351216),g=e.i(402662),y=e.i(254226),w=e.i(563851);async function E(e){return(await (0,y.requireUser)(e)).ok?_.NextResponse.json({key:(0,w.getServiceToken)()}):_.NextResponse.json({error:"UNAUTHORIZED"},{status:401})}async function x(e){let t=(0,g.checkOrigin)(e);if(t)return t;if(!(await (0,y.requireUser)(e)).ok)return _.NextResponse.json({error:"UNAUTHORIZED"},{status:401});let r=(0,w.rotateServiceToken)();return _.NextResponse.json({key:r})}e.s(["GET",0,E,"POST",0,x,"runtime",0,"nodejs"],478110);var k=e.i(478110);let S=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/system/service-token/route",pathname:"/api/system/service-token",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/system/service-token/route.ts",nextConfigOutput:"standalone",userland:k,...{}}),{workAsyncStorage:C,workUnitAsyncStorage:N,serverHooks:T}=S;async function A(e,t,n){n.requestMeta&&(0,a.setRequestMeta)(e,n.requestMeta),S.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let _="/api/system/service-token/route";_=_.replace(/\/index$/,"")||"/";let g=await S.prepare(e,t,{srcPage:_,multiZoneDraftMode:!1});if(!g)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:y,params:w,nextConfig:E,parsedUrl:x,isDraftMode:k,prerenderManifest:C,routerServerContext:N,isOnDemandRevalidate:T,revalidateOnlyGenerated:A,resolvedPathname:P,clientReferenceManifest:O,serverActionsManifest:b}=g,q=(0,o.normalizeAppPath)(_),j=!!(C.dynamicRoutes[q]||C.routes[P]),I=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,x,!1):t.end("This page could not be found"),null);if(j&&!k){let e=!!C.routes[P],t=C.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(E.adapterPath)return await I();throw new f.NoFallbackError}}let U=null;!j||S.isDev||k||(U="/index"===(U=P)?"/":U);let H=!0===S.isDev||!j,D=j&&!H;b&&O&&(0,i.setManifestsSingleton)({page:_,clientReferenceManifest:O,serverActionsManifest:b});let M=e.method||"GET",B=(0,s.getTracer)(),$=B.getActiveScopeSpan(),F=!!(null==N?void 0:N.isWrappedByNextServer),K=!!(0,a.getRequestMeta)(e,"minimalMode"),L=(0,a.getRequestMeta)(e,"incrementalCache")||await S.getIncrementalCache(e,E,C,K);null==L||L.resetRequestCache(),globalThis.__incrementalCache=L;let z={params:w,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:H,incrementalCache:L,cacheLifeProfiles:E.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>S.onRequestError(e,t,n,a,N)},sharedContext:{buildId:y}},G=new l.NodeNextRequest(e),W=new l.NodeNextResponse(t),V=u.NextRequestAdapter.fromNodeNextRequest(G,(0,u.signalFromNodeResponse)(t));try{let a,i=async e=>S.handle(V,z).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=B.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${M} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),a&&a!==e&&(a.setAttribute("http.route",n),a.updateName(t))}else e.updateName(`${M} ${_}`)}),o=async a=>{var s,o;let l=async({previousCacheEntry:r})=>{try{if(!K&&T&&A&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(a);e.fetchMetrics=z.renderOpts.fetchMetrics;let o=z.renderOpts.pendingWaitUntil;o&&n.waitUntil&&(n.waitUntil(o),o=void 0);let l=z.renderOpts.collectedTags;if(!j)return await (0,p.sendResponse)(G,W,s,z.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[m.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>=m.INFINITE_CACHE)&&z.renderOpts.collectedRevalidate,n=void 0===z.renderOpts.collectedExpire||z.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:z.renderOpts.collectedExpire;return{value:{kind:R.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await S.onRequestError(e,t,{routerKind:"App Router",routePath:_,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:T})},!1,N),t}},u=await S.handleResponse({req:e,nextConfig:E,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:A,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:K});if(!j)return null;if((null==u||null==(s=u.value)?void 0:s.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",T?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),k&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return K&&j||d.delete(m.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,v.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(G,W,new Response(u.value.body,{headers:d,status:u.value.status||200})),null};F&&$?await o($):(a=B.getActiveScopeSpan(),await B.withPropagatedContext(e.headers,()=>B.trace(d.BaseServerSpan.handleRequest,{spanName:`${M} ${_}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},o),void 0,!F))}catch(t){if(t instanceof f.NoFallbackError||await S.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:T})},!1,N),j)throw t;return await (0,p.sendResponse)(G,W,new Response(null,{status:500})),null}}e.s(["handler",0,A,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:N})},"routeModule",0,S,"serverHooks",0,T,"workAsyncStorage",0,C,"workUnitAsyncStorage",0,N],458321)},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)))},769787,e=>{e.v(t=>Promise.all(["server/chunks/01er_better-auth_dist_adapters_kysely-adapter_index_mjs_0s~-4gu._.js"].map(t=>e.l(t))).then(()=>t(717789)))},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)))},697743,e=>{e.v(t=>Promise.all(["server/chunks/0.u4_next_05jevxw._.js"].map(t=>e.l(t))).then(()=>t(428325)))},99243,e=>{e.v(e=>Promise.resolve().then(()=>e(313414)))},893412,e=>{e.v(t=>Promise.all(["server/chunks/src_lib_auth_api-key_ts_0t_ma-t._.js"].map(t=>e.l(t))).then(()=>t(499465)))}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0cjpldw._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[
|
|
1
|
+
module.exports=[750227,(t,e,r)=>{e.exports=t.x("node:path",()=>require("node:path"))},666680,(t,e,r)=>{e.exports=t.x("node:crypto",()=>require("node:crypto"))},912714,(t,e,r)=>{e.exports=t.x("node:fs/promises",()=>require("node:fs/promises"))},32851,t=>{"use strict";var e=t.i(912714),r=t.i(750227);async function a(t,i=Date.now()){let s,o,l;if(!t)return 0;try{s=await (0,e.realpath)(t)}catch{return 0}try{o=await (0,e.realpath)(r.default.join(s,".scratch"))}catch{return 0}let u=r.default.relative(s,o);if(""===u||u.startsWith("..")||r.default.isAbsolute(u))return 0;try{l=await (0,e.readdir)(o)}catch{return 0}let c=0;return await Promise.all(l.map(async t=>{let a=r.default.join(o,t);try{let t=await (0,e.realpath)(a),s=r.default.relative(o,t);if(s.startsWith("..")||r.default.isAbsolute(s))return;let l=await (0,e.stat)(t);i-l.mtimeMs>6048e5&&(await (0,e.rm)(t,{recursive:!0,force:!0}),c+=1)}catch{}})),c}t.i(666680),t.s(["sweepScratch",0,a],32851)}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0cv6uhs._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[918622,(e,t,n)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},324725,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},270406,(e,t,n)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},193695,(e,t,n)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},100705,(e,t,n)=>{"use strict";t.exports=e.r(918622)},294382,(e,t,n)=>{"use strict";t.exports=e.r(100705).vendored["react-rsc"].React},362744,(e,t,n)=>{"use strict";var r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o={},l={RequestCookies:()=>f,ResponseCookies:()=>g,parseCookie:()=>c,parseSetCookie:()=>u,stringifyCookie:()=>p};for(var d in l)r(o,d,{get:l[d],enumerable:!0});function p(e){var t;let n=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),r=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===n.length?r:`${r}; ${n.join("; ")}`}function c(e){let t=new Map;for(let n of e.split(/; */)){if(!n)continue;let e=n.indexOf("=");if(-1===e){t.set(n,"true");continue}let[r,a]=[n.slice(0,e),n.slice(e+1)];try{t.set(r,decodeURIComponent(null!=a?a:"true"))}catch{}}return t}function u(e){if(!e)return;let[[t,n],...r]=c(e),{domain:a,expires:s,httponly:i,maxage:o,path:l,samesite:d,secure:p,partitioned:u,priority:f}=Object.fromEntries(r.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var g,y,v={name:t,value:decodeURIComponent(n),domain:a,...s&&{expires:new Date(s)},...i&&{httpOnly:!0},..."string"==typeof o&&{maxAge:Number(o)},path:l,...d&&{sameSite:h.includes(g=(g=d).toLowerCase())?g:void 0},...p&&{secure:!0},...f&&{priority:m.includes(y=(y=f).toLowerCase())?y:void 0},...u&&{partitioned:!0}};let e={};for(let t in v)v[t]&&(e[t]=v[t]);return e}}t.exports=((e,t,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of s(t))i.call(e,o)||void 0===o||r(e,o,{get:()=>t[o],enumerable:!(n=a(t,o))||n.enumerable});return e})(r({},"__esModule",{value:!0}),o);var h=["strict","lax","none"],m=["low","medium","high"],f=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,n]of c(t))this._parsed.set(e,{name:e,value:n})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let n=Array.from(this._parsed);if(!e.length)return n.map(([e,t])=>t);let r="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return n.filter(([e])=>e===r).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,n]=1===e.length?[e[0].name,e[0].value]:e,r=this._parsed;return r.set(t,{name:t,value:n}),this._headers.set("cookie",Array.from(r).map(([e,t])=>p(t)).join("; ")),this}delete(e){let t=this._parsed,n=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>p(t)).join("; ")),n}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},g=class{constructor(e){var t,n,r;this._parsed=new Map,this._headers=e;const a=null!=(r=null!=(n=null==(t=e.getSetCookie)?void 0:t.call(e))?n:e.get("set-cookie"))?r:[];for(const e of Array.isArray(a)?a:function(e){if(!e)return[];var t,n,r,a,s,i=[],o=0;function l(){for(;o<e.length&&/\s/.test(e.charAt(o));)o+=1;return o<e.length}for(;o<e.length;){for(t=o,s=!1;l();)if(","===(n=e.charAt(o))){for(r=o,o+=1,l(),a=o;o<e.length&&"="!==(n=e.charAt(o))&&";"!==n&&","!==n;)o+=1;o<e.length&&"="===e.charAt(o)?(s=!0,o=a,i.push(e.substring(t,r)),t=o):o=r+1}else o+=1;(!s||o>=e.length)&&i.push(e.substring(t,e.length))}return i}(a)){const t=u(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let n=Array.from(this._parsed.values());if(!e.length)return n;let r="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return n.filter(e=>e.name===r)}has(e){return this._parsed.has(e)}set(...e){let[t,n,r]=1===e.length?[e[0].name,e[0].value,e[0]]:e,a=this._parsed;return a.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:n,...r})),function(e,t){for(let[,n]of(t.delete("set-cookie"),e)){let e=p(n);t.append("set-cookie",e)}}(a,this._headers),this}delete(...e){let[t,n]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...n,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(p).join("; ")}}},727028,(e,t,n)=>{t.exports=e.x("node:zlib",()=>require("node:zlib"))},754297,e=>{"use strict";e.s(["SKILL_MD",0,'---\nname: wiki-viewer\ndescription: Read and edit markdown files in a running wiki-viewer instance over its HTTP collab API. Use when the user mentions wiki-viewer, asks you to edit local notes, or shares a localhost wiki-viewer URL. Handles agent registration, scoped capabilities, block-level edits with audit-log provenance, comments, and suggestions.\nlicense: MIT\n---\n\n# wiki-viewer agent skill\n\nYou are working with **wiki-viewer**, a local-first markdown viewer that exposes an HTTP API for agents. Files on disk are the source of truth. Every AI-authored edit writes clean markdown; provenance is recorded in the activity feed.\n\n## Quick orientation: two tiers\n\n| Tier | Routes | File types | When to use |\n| ------------------- | ----------------------- | ----------------------------------- | --------------------------------------------------------------------------------- |\n| **Tier 1 — Raw FS** | `/api/agent/fs/*` | All types (markdown, code, binary…) | Fast filework. Read, write, list, move, delete, search. Audited but no review UI. |\n| **Tier 2 — Collab** | `/api/agent/files/*.md` | Markdown only | Block-scoped concurrency-safe writes with activity-log provenance. |\n\nBoth tiers use the same auth (TOFU token). Pick the tier based on `X-Collab-State` (see [Which tier do I use?](#which-tier-do-i-use)).\n\n---\n\n## Discovery\n\nThe server publishes everything you need at one URL:\n\n```\nGET http://<host>:<port>/api/agents/install\n```\n\nThis returns JSON with: bootstrap instructions, route table, op vocabulary, the current registration endpoint, and the human-facing approval workflow. Fetch this first and treat it as authoritative for the running instance you\'re talking to.\n\nIf the user pasted only the wiki-viewer URL, append `/api/agents/install` and fetch it before doing anything else.\n\n## Authentication\n\nwiki-viewer uses **TOFU (Trust On First Use)**:\n\n1. You register anonymously. Server stores a pending request.\n2. The human approves you in the wiki-viewer AI Panel.\n3. You poll, receive a one-shot token, and use it from then on.\n\n**Fast path (same machine only):** when running directly on the wiki-viewer host, send your registration with the header `X-Service-Token: <contents of ~/.wiki-viewer/service-token>` (0600, written by the server at startup, shown/rotated in Settings). Registration then auto-approves: the response is `200 {status:"approved", agentId, token}` immediately — no pending state, no polling, no approval step. Requested scope is granted as-is. Tell the human only if the fast path is rejected.\n\n### Register\n\n```\nPOST /api/agent/register\nContent-Type: application/json\n\n{\n "id": "ai:<your-name>",\n "displayName": "<readable name>",\n "scope": {\n "paths": ["**/*"],\n "ops": ["read", "mutate"]\n }\n}\n```\n\n- `id` must match `^ai:[a-z][a-z0-9-]{0,30}$`. Pick something stable per agent identity (e.g. `ai:claude`, `ai:cursor`, `ai:my-script`).\n- `displayName` 1-80 chars. What the human sees in the approval UI.\n- `scope.paths` is a glob list. Use `**/*` for full repo access, or restrict to a subtree like `notes/**`.\n- `scope.ops` ⊆ `["read", "mutate"]` (add `"delete"` if you need to remove files).\n- `scope.workspaceId` (optional): pin this grant to a single workspace id. Omit\n to request a wildcard grant usable in any workspace (the human can still narrow\n it at approval time).\n\nResponse:\n\n```json\n{\n "registrationId": "reg_<32hex>",\n "pollUrl": "/api/agent/register/<regId>",\n "status": "pending"\n}\n```\n\n**Tell the human**: "Open the wiki-viewer AI Panel and approve my registration."\n\n(With a service-token header you won\'t reach this step — see the fast path above.)\n\n### Poll\n\n```\nGET /api/agent/register/<registrationId>\n```\n\n- `202 {status:"pending"}` — keep polling, every 2-5s.\n- `200 {status:"approved", agentId, token}` — capture token immediately. Pickup is **one-shot**; you cannot fetch it again.\n- `410 {status:"denied"}` or `{status:"consumed"}` — abort or restart registration.\n- `404` — registration expired, re-register.\n\n### Use the token\n\nEvery subsequent request:\n\n```\nAuthorization: Bearer <token>\nX-Agent-Id: ai:<your-name>\nX-Workspace: <workspaceId> # optional but recommended (see Workspaces)\n```\n\nThe `X-Agent-Id` must match the id the token was issued for. Spoofing rejected with `401`.\n\n## Workspaces\n\nA wiki-viewer instance can serve **multiple root directories ("workspaces")**\nat once. Every file path you use is relative to **one** workspace\'s root.\n\n- **Targeting a workspace:** send an `X-Workspace: <workspaceId>` header on every\n request (or append `?ws=<workspaceId>` to the URL). If you omit it, the server\n resolves to a default (the most-recently-opened workspace), which is correct\n for a single-workspace instance but ambiguous when several exist — so prefer\n to be explicit.\n- **Discovering workspace ids:** `GET /api/agent/settings` returns the resolved\n `root` (the active workspace\'s directory) for whatever `X-Workspace` you send.\n The human picks/creates workspaces in the UI; ask them for the id, or read it\n from the `?ws=` param in a wiki-viewer URL they pasted.\n- **Scoped grants:** your token may be pinned to one workspace at approval time.\n A request that resolves to a different workspace is rejected `403 FORBIDDEN`.\n A token with no workspace pin works against any workspace (wildcard).\n- **Isolation:** paths in workspace A never touch workspace B, even if they share\n the same relative path (`notes.md` in A ≠ `notes.md` in B).\n\nWhenever the human is working in a specific workspace, capture its id once and\nsend `X-Workspace: <id>` on all subsequent calls.\n\n## Reading\n\n```\nGET /api/agent/files/<url-encoded-path>.md\n```\n\nReturns a Snapshot:\n\n```json\n{\n "path": "notes/plan.md",\n "revision": 7,\n "fingerprint": "sha256:...",\n "blocks": [\n { "ref": "b1a3f0", "type": "heading", "level": 1, "markdown": "# Plan" },\n { "ref": "b7f2c1", "type": "paragraph", "markdown": "Ship in June." }\n ],\n "comments": [...],\n "suggestions": [...],\n "lastEventId": 12\n}\n```\n\nBlock `ref` strings are stable across edits. Use them to target mutations. **Always read a fresh snapshot before mutating** so you have the current `revision`.\n\n## Mutating\n\n```\nPOST /api/agent/files/<path>.md\nAuthorization: Bearer <token>\nX-Agent-Id: ai:<your-name>\nContent-Type: application/json\nIdempotency-Key: <uuid you generate per request>\n\n{\n "baseRevision": <revision from snapshot>,\n "by": "ai:<your-name>",\n "ops": [ <op>, ... ]\n}\n```\n\nRequirements:\n\n- `Idempotency-Key` header mandatory. Same key + same body within 5 minutes returns the cached response. Same key + different body returns `409 IDEMPOTENCY_KEY_REUSED`.\n- `by` must equal your `X-Agent-Id` or you get `403 FORBIDDEN`.\n- If `baseRevision` is stale, response is `409 STALE_REVISION` with a fresh snapshot. Read the new revision, rebuild your op against current refs, retry.\n\n### Op vocabulary\n\n**Block ops** — content edits:\n\n```json\n{ "type": "block.replace", "ref": "b7f2c1", "markdown": "New content." }\n{ "type": "block.insertAfter", "ref": "b7f2c1", "markdown": "..." }\n{ "type": "block.insertBefore", "ref": "b7f2c1", "markdown": "..." }\n{ "type": "block.delete", "ref": "b7f2c1" }\n{ "type": "block.append", "markdown": "..." }\n{ "type": "block.prepend", "markdown": "..." }\n```\n\nBlock ops write clean markdown verbatim. Provenance is recorded in the activity feed, not document bytes. Legacy `basis`, `basisDetail`, and `inResponseTo` fields remain accepted but are ignored for backward compatibility.\n\n**Comment ops** — threaded discussion attached to a block:\n\n```json\n{ "type": "comment.add", "ref": "b7f2c1", "text": "Why end of June?" }\n{ "type": "comment.reply", "commentId": "c4a1", "text": "Because of API freeze." }\n{ "type": "comment.resolve", "commentId": "c4a1" }\n{ "type": "comment.reopen", "commentId": "c4a1" }\n```\n\n**Suggestion ops** — proposed edits the human must accept:\n\n```json\n{\n "type": "suggestion.add",\n "ref": "b7f2c1",\n "kind": "replace",\n "markdown": "Ship the rewrite by July 15.",\n "basis": "described",\n "basisDetail": "user mentioned slippage in chat"\n}\n```\n\nSuggestion kinds: `"replace" | "insertAfter" | "insertBefore" | "delete"`.\n\nSuggestions are separate UI objects for proposed edits. Direct block ops commit clean markdown immediately; both actions are recorded in audit/activity logs.\n\n## Polling events\n\n```\nGET /api/agent/events/<path>.md?after=<lastEventId>\n```\n\nReturns events emitted since `lastEventId`: human comments, accepted suggestions, external file edits (the human opened the file in vim), and so on. Use this to react when the human responds to one of your comments or suggestions.\n\nAcknowledge:\n\n```\nPOST /api/agent/events/<path>.md\n{ "upToId": <id>, "by": "ai:<your-name>" }\n```\n\nAcks are advisory; events are never deleted.\n\n## Error codes\n\n| Status | Code | Meaning |\n| ------ | ---------------------- | --------------------------------------------------------------------------------------- |\n| 401 | UNAUTHORIZED | bad/missing token or X-Agent-Id |\n| 403 | FORBIDDEN | scope/path mismatch, workspace not covered by grant, or `by` doesn\'t match `X-Agent-Id` |\n| 404 | FILE_NOT_FOUND | path doesn\'t exist under server root |\n| 409 | STALE_REVISION | `baseRevision` wrong, retry with included snapshot |\n| 409 | BLOCK_NOT_FOUND | ref no longer exists, refetch snapshot |\n| 409 | IDEMPOTENCY_KEY_REUSED | same key, different body |\n| 422 | INVALID_MARKDOWN | op\'s markdown failed to parse |\n| 429 | RATE_LIMITED | bucket exhausted, honor `Retry-After` header |\n\n---\n\n## Working with files (raw filesystem — Tier 1)\n\nAll Tier-1 routes require `Authorization: Bearer <token>` + `X-Agent-Id: ai:<name>` (same as Tier 2). The agent\'s `scope.paths` glob applies to every surface (reads, ls results, search results, move, delete).\n\n### Scope ops\n\nWhen registering, `scope.ops` can include:\n\n- `read` — read files + list + search\n- `mutate` — create / overwrite / move\n- `delete` — remove files/dirs (separate from mutate so a human can grant edit-but-never-delete)\n\nExample registration with full access:\n\n```json\n{\n "id": "ai:claude",\n "scope": { "paths": ["**/*"], "ops": ["read", "mutate", "delete"] }\n}\n```\n\n### Read a file\n\n```\nGET /api/agent/fs/file/<path>\n```\n\nReturns raw bytes. Metadata in response headers:\n\n```\nETag: "<sha256>"\nX-File-Size: <bytes>\nX-File-Mtime: <ISO-8601>\nContent-Type: <mime>\nX-Collab-State: active | tracked | untracked | not-markdown\nX-Collab-Revision: <n>\nX-Collab-Snapshot: /api/agent/files/<path>.md # when applicable\n```\n\nSupports `Range` header for large/binary files.\n\n### Write a file\n\n```\nPUT /api/agent/fs/file/<path>\nIf-Match: "<sha256>" # required for overwrites; omit for creates\nContent-Type: <mime>\n<raw bytes body>\n```\n\n- **Create** (file doesn\'t exist): omit `If-Match`. Creating a file that already exists without `If-Match` → 412 (no blind clobber).\n- **Overwrite** (file exists): send `If-Match` with the sha256 you read. Mismatch → 412.\n- `?mkdirs=true` — create parent directories.\n- `?force=true` — bypass `If-Match` check (audited; use sparingly).\n\nFor `.md` files, also send:\n\n```\nIf-Collab-Match: <X-Collab-Revision> # prevents writing into a live collab session\n```\n\n(See [Which tier do I use?](#which-tier-do-i-use).)\n\nResponse:\n\n```json\n{\n "path": "...",\n "sha256": "...",\n "size": 1234,\n "mtime": "...",\n "created": false\n}\n```\n\n### Delete a file\n\n```\nDELETE /api/agent/fs/file/<path>\nIf-Match: "<sha256>" # required — you must have read the file first\n```\n\nRequires `delete` in `scope.ops`. Deletes the `.proof/` sidecar too for `.md` files. For directories: `?recursive=true`.\n\n### List a directory\n\n```\nGET /api/agent/fs/ls/<path>?recursive=true&limit=500&depth=3\n```\n\nReturns `{ entries: [{name, type, path, size, mtime}] }`. Unauthorized paths silently omitted. Excludes `.proof/`.\n\n### Move / rename\n\n```\nPOST /api/agent/fs/move\nContent-Type: application/json\n\n{ "from": "notes/old.md", "to": "notes/new.md", "ifMatch": "<sha256>" }\n```\n\nMoves the `.proof/` sidecar for `.md` files automatically.\n\n### Search (grep / glob)\n\n```\nPOST /api/agent/fs/search\nContent-Type: application/json\n\n{ "kind": "grep", "query": "TODO", "path": "src", "glob": "*.ts", "limit": 100 }\n```\n\n```\nPOST /api/agent/fs/search\nContent-Type: application/json\n\n{ "kind": "glob", "query": "**/*.test.ts" }\n```\n\nServer-side: one call replaces dozens of `ls`+`read` round-trips. Results are scope-filtered. Glob dialect: `**`, `*`, `?` only (no braces/negation in v1).\n\n### Error codes (Tier 1)\n\n| Status | Code | Meaning |\n| ------ | ------------------- | --------------------------------------------------------------------------- |\n| 400 | BAD_REQUEST | Invalid path or body |\n| 401 | UNAUTHORIZED | Bad/missing token or X-Agent-Id |\n| 403 | FORBIDDEN | Scope mismatch or missing `delete` op |\n| 404 | NOT_FOUND | Path doesn\'t exist |\n| 409 | COLLAB_ACTIVE | Raw PUT rejected — doc is active-collab; use Tier-2 or send If-Collab-Match |\n| 412 | PRECONDITION_FAILED | If-Match sha mismatch (concurrent modification) |\n| 413 | PAYLOAD_TOO_LARGE | File exceeds 50 MB limit |\n| 429 | RATE_LIMITED | Honor `Retry-After` |\n\n---\n\n## Which tier do I use?\n\nEvery `GET /api/agent/fs/file/<path>` (and every Tier-2 snapshot read) returns `X-Collab-State`.\n\n| `X-Collab-State` | Meaning | Use |\n| ---------------- | --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |\n| `active` | Human has this `.md` open in the editor, OR it has pending suggestions / unresolved comments. | **Tier 2 block-ops only.** A raw `PUT` returns `409 COLLAB_ACTIVE`. |\n| `tracked` | `.md` has a sidecar (prior collab history), no active session. | Prefer Tier-2 for prose/semantic edits. Raw ok for mechanical/whole-file ops (reformat, regenerate). |\n| `untracked` | `.md`, no sidecar yet. | Raw is fine. Tier-2 creates a sidecar (starts provenance tracking). |\n| `not-markdown` | Any non-`.md` file. | **Tier-1 raw only.** Tier 2 does not apply. |\n\n**Rule (one sentence):** Read the file, check `X-Collab-State`, use Tier-2 if `active`, else use Tier-1. For non-markdown, always Tier-1.\n\n**Editing a `.md` safely:**\n\n```\n1. GET /api/agent/fs/file/<path>.md\n → note ETag (sha256) and X-Collab-Revision + X-Collab-State\n\n2a. If X-Collab-State == "active":\n → POST /api/agent/files/<path>.md (block-ops, Tier-2)\n Use the X-Collab-Snapshot URL. See "Mutating" section below.\n\n2b. Otherwise (tracked / untracked):\n → PUT /api/agent/fs/file/<path>.md (raw Tier-1)\n If-Match: "<ETag from step 1>"\n If-Collab-Match: <X-Collab-Revision from step 1>\n\n3. If you get 409 COLLAB_ACTIVE: the doc became active after your read.\n Switch to Tier-2 (block-ops) using the URL in the response body.\n```\n\n**MCP-capable agents:** run `npx wiki-viewer-mcp` (set `WIKI_VIEWER_URL`, `WIKI_VIEWER_TOKEN`, `WIKI_VIEWER_AGENT_ID`; its `register` command auto-approves when a service token is available). It exposes **Tier-1 file tools only** — `read_file`, `write_file`, `edit_file`, `list_directory`, `search`, `move_file`, `delete_file` — and reads `X-Collab-State` so it won\'t clobber an active doc: it blocks the write and tells you to use the collaborative path instead. The MCP shim has **no Tier-2 (block-ops / suggestion / comment) tools** — to co-write a doc, use the Tier-2 HTTP endpoints described above directly (the skill instructions cover them). Use the MCP for fast filework; use Tier-2 HTTP for reviewable doc collaboration.\n\n---\n\n## Working style\n\n- Read before write. Always GET a fresh snapshot to capture current `revision` and block `ref`s.\n- One file per request. There is no batch-across-files endpoint.\n- Atomic ops. Each POST applies all its ops or none. Order matters within a batch.\n- Write clean markdown. Legacy `basis`, `basisDetail`, and `inResponseTo` fields are accepted but ignored for backward compatibility.\n- Prefer comments and suggestions over silent edits. The human is your collaborator, not your reviewer-of-last-resort.\n- Poll events between turns when the human is reviewing your work; respond to their comments rather than re-litigating.\n\n## Sample first interaction\n\n```\n1. GET /api/agents/install # discovery\n2. POST /api/agent/register # register (include "delete" in ops if needed)\n # on the server host? add X-Service-Token -> token comes back instantly, skip 3-4\n3. tell human: "approve me in the AI Panel"\n4. GET /api/agent/register/<regId> # poll until approved\n\n# Working mode (Tier-1, e.g. code files or untracked .md)\n5. GET /api/agent/fs/ls/src?recursive=true # list\n6. GET /api/agent/fs/file/src/main.ts # read -> capture ETag\n7. PUT /api/agent/fs/file/src/main.ts (If-Match: <sha>) # write\n\n# Collaborating mode (Tier-2, active .md)\n5. GET /api/agent/fs/file/notes/plan.md # read -> X-Collab-State: active\n6. GET /api/agent/files/notes/plan.md # read snapshot (Tier-2)\n7. POST /api/agent/files/notes/plan.md # suggest or mutate (Tier-2)\n8. GET /api/agent/events/notes/plan.md?after=<id> # listen for replies\n```\n'])},564946,e=>{"use strict";var t=e.i(985426),n=e.i(257574),r=e.i(507835),a=e.i(457789),s=e.i(119791),i=e.i(141062),o=e.i(957291),l=e.i(535899),d=e.i(610241),p=e.i(62749),c=e.i(624891),u=e.i(725836),h=e.i(532736),m=e.i(257858),f=e.i(487476),g=e.i(193695);e.i(484264);var y=e.i(315709),v=e.i(351216),w=e.i(727028),b=e.i(754297);function k(e,t){return e.toString(8).padStart(t-1,"0")+"\0"}function T(e,t,n,r){Buffer.from(n,"utf-8").subarray(0,r).copy(e,t)}async function R(e){let t=Math.floor(Date.now()/1e3),n=function(e){let t=[];for(let n of e){let e=function(e,t,n){let r=Buffer.alloc(512,0);T(r,0,e,100),T(r,100,"0000644\0",8),T(r,108,"0000000\0",8),T(r,116,"0000000\0",8),T(r,124,k(t,12),12),T(r,136,k(n,12),12),r[156]=48,T(r,257,"ustar\0",6),T(r,263,"00",2);let a=0;for(let e=0;e<512;e++)a+=e>=148&&e<156?32:r[e];return T(r,148,k(a,7)+" ",8),r}(n.name,n.content.length,n.mtime);t.push(e),t.push(n.content);let r=n.content.length%512;0!==r&&t.push(Buffer.alloc(512-r,0))}return t.push(Buffer.alloc(1024,0)),Buffer.concat(t)}([{name:"wiki-viewer-skill/SKILL.md",content:Buffer.from(b.SKILL_MD,"utf-8"),mtime:t}]),r=(0,w.gzipSync)(n);return new v.NextResponse(r,{status:200,headers:{"Content-Type":"application/gzip","Content-Disposition":'attachment; filename="wiki-viewer-skill.tar.gz"',"Cache-Control":"no-store"}})}e.s(["GET",0,R,"runtime",0,"nodejs"],952984);var E=e.i(952984);let I=new t.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/agents/skill.tar.gz/route",pathname:"/api/agents/skill.tar.gz",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/agents/skill.tar.gz/route.ts",nextConfigOutput:"standalone",userland:E,...{}}),{workAsyncStorage:x,workUnitAsyncStorage:A,serverHooks:S}=I;async function C(e,t,r){r.requestMeta&&(0,a.setRequestMeta)(e,r.requestMeta),I.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/agents/skill.tar.gz/route";v=v.replace(/\/index$/,"")||"/";let w=await I.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:b,params:k,nextConfig:T,parsedUrl:R,isDraftMode:E,prerenderManifest:x,routerServerContext:A,isOnDemandRevalidate:S,revalidateOnlyGenerated:C,resolvedPathname:O,clientReferenceManifest:_,serverActionsManifest:P}=w,D=(0,o.normalizeAppPath)(v),U=!!(x.dynamicRoutes[D]||x.routes[O]),M=async()=>((null==A?void 0:A.render404)?await A.render404(e,t,R,!1):t.end("This page could not be found"),null);if(U&&!E){let e=!!x.routes[O],t=x.dynamicRoutes[D];if(t&&!1===t.fallback&&!e){if(T.adapterPath)return await M();throw new g.NoFallbackError}}let N=null;!U||I.isDev||E||(N="/index"===(N=O)?"/":N);let j=!0===I.isDev||!U,q=U&&!j;P&&_&&(0,i.setManifestsSingleton)({page:v,clientReferenceManifest:_,serverActionsManifest:P});let L=e.method||"GET",B=(0,s.getTracer)(),X=B.getActiveScopeSpan(),F=!!(null==A?void 0:A.isWrappedByNextServer),W=!!(0,a.getRequestMeta)(e,"minimalMode"),H=(0,a.getRequestMeta)(e,"incrementalCache")||await I.getIncrementalCache(e,T,x,W);null==H||H.resetRequestCache(),globalThis.__incrementalCache=H;let G={params:k,previewProps:x.preview,renderOpts:{experimental:{authInterrupts:!!T.experimental.authInterrupts},cacheComponents:!!T.cacheComponents,supportsDynamicResponse:j,incrementalCache:H,cacheLifeProfiles:T.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,n,r,a)=>I.onRequestError(e,t,r,a,A)},sharedContext:{buildId:b}},$=new l.NodeNextRequest(e),z=new l.NodeNextResponse(t),K=d.NextRequestAdapter.fromNodeNextRequest($,(0,d.signalFromNodeResponse)(t));try{let a,i=async e=>I.handle(K,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")!==p.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 r=n.get("next.route");if(r){let t=`${L} ${r}`;e.setAttributes({"next.route":r,"http.route":r,"next.span_name":t}),e.updateName(t),a&&a!==e&&(a.setAttribute("http.route",r),a.updateName(t))}else e.updateName(`${L} ${v}`)}),o=async a=>{var s,o;let l=async({previousCacheEntry:n})=>{try{if(!W&&S&&C&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(a);e.fetchMetrics=G.renderOpts.fetchMetrics;let o=G.renderOpts.pendingWaitUntil;o&&r.waitUntil&&(r.waitUntil(o),o=void 0);let l=G.renderOpts.collectedTags;if(!U)return await (0,u.sendResponse)($,z,s,G.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 n=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,r=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:y.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:r}}}}catch(t){throw(null==n?void 0:n.isStale)&&await I.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:q,isOnDemandRevalidate:S})},!1,A),t}},d=await I.handleResponse({req:e,nextConfig:T,cacheKey:N,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:x,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:C,responseGenerator:l,waitUntil:r.waitUntil,isMinimalMode:W});if(!U)return null;if((null==d||null==(s=d.value)?void 0:s.kind)!==y.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(o=d.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});W||t.setHeader("x-nextjs-cache",S?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),E&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let p=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return W&&U||p.delete(f.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||p.get("Cache-Control")||p.set("Cache-Control",(0,m.getCacheControlHeader)(d.cacheControl)),await (0,u.sendResponse)($,z,new Response(d.value.body,{headers:p,status:d.value.status||200})),null};F&&X?await o(X):(a=B.getActiveScopeSpan(),await B.withPropagatedContext(e.headers,()=>B.trace(p.BaseServerSpan.handleRequest,{spanName:`${L} ${v}`,kind:s.SpanKind.SERVER,attributes:{"http.method":L,"http.target":e.url}},o),void 0,!F))}catch(t){if(t instanceof g.NoFallbackError||await I.onRequestError(e,t,{routerKind:"App Router",routePath:D,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:q,isOnDemandRevalidate:S})},!1,A),U)throw t;return await (0,u.sendResponse)($,z,new Response(null,{status:500})),null}}e.s(["handler",0,C,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:x,workUnitAsyncStorage:A})},"routeModule",0,I,"serverHooks",0,S,"workAsyncStorage",0,x,"workUnitAsyncStorage",0,A],564946)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0dya7sd._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[666680,(e,r,t)=>{r.exports=e.x("node:crypto",()=>require("node:crypto"))},750227,(e,r,t)=>{r.exports=e.x("node:path",()=>require("node:path"))},660526,(e,r,t)=>{r.exports=e.x("node:os",()=>require("node:os"))},902157,(e,r,t)=>{r.exports=e.x("node:fs",()=>require("node:fs"))},242368,e=>{"use strict";var r=e.i(750227),t=e.i(660526),o=e.i(902157),i=e.i(666680);let n=()=>r.default.join(process.env.HOME??t.default.homedir(),".wiki-viewer","service-token");e.s(["ensureServiceToken",0,function(){if((0,o.mkdirSync)(r.default.dirname(n()),{recursive:!0}),!(0,o.existsSync)(n())){let e=`wv_svc_${(0,i.randomBytes)(32).toString("hex")}`;(0,o.writeFileSync)(n(),e,{mode:384});try{(0,o.chmodSync)(n(),384)}catch{}return e}return(0,o.readFileSync)(n(),"utf-8").trim()}])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0f_hd-p._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},100705,(e,t,r)=>{"use strict";t.exports=e.r(918622)},294382,(e,t,r)=>{"use strict";t.exports=e.r(100705).vendored["react-rsc"].React},362744,(e,t,r)=>{"use strict";var n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o={},l={RequestCookies:()=>f,ResponseCookies:()=>m,parseCookie:()=>d,parseSetCookie:()=>c,stringifyCookie:()=>p};for(var u in l)n(o,u,{get:l[u],enumerable:!0});function p(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),n=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?n:`${n}; ${r.join("; ")}`}function d(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[n,a]=[r.slice(0,e),r.slice(e+1)];try{t.set(n,decodeURIComponent(null!=a?a:"true"))}catch{}}return t}function c(e){if(!e)return;let[[t,r],...n]=d(e),{domain:a,expires:s,httponly:i,maxage:o,path:l,samesite:u,secure:p,partitioned:c,priority:f}=Object.fromEntries(n.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var m,y,v={name:t,value:decodeURIComponent(r),domain:a,...s&&{expires:new Date(s)},...i&&{httpOnly:!0},..."string"==typeof o&&{maxAge:Number(o)},path:l,...u&&{sameSite:g.includes(m=(m=u).toLowerCase())?m:void 0},...p&&{secure:!0},...f&&{priority:h.includes(y=(y=f).toLowerCase())?y:void 0},...c&&{partitioned:!0}};let e={};for(let t in v)v[t]&&(e[t]=v[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of s(t))i.call(e,o)||void 0===o||n(e,o,{get:()=>t[o],enumerable:!(r=a(t,o))||r.enumerable});return e})(n({},"__esModule",{value:!0}),o);var g=["strict","lax","none"],h=["low","medium","high"],f=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of d(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===n).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,n=this._parsed;return n.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(n).map(([e,t])=>p(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>p(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},m=class{constructor(e){var t,r,n;this._parsed=new Map,this._headers=e;const a=null!=(n=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?n:[];for(const e of Array.isArray(a)?a:function(e){if(!e)return[];var t,r,n,a,s,i=[],o=0;function l(){for(;o<e.length&&/\s/.test(e.charAt(o));)o+=1;return o<e.length}for(;o<e.length;){for(t=o,s=!1;l();)if(","===(r=e.charAt(o))){for(n=o,o+=1,l(),a=o;o<e.length&&"="!==(r=e.charAt(o))&&";"!==r&&","!==r;)o+=1;o<e.length&&"="===e.charAt(o)?(s=!0,o=a,i.push(e.substring(t,n)),t=o):o=n+1}else o+=1;(!s||o>=e.length)&&i.push(e.substring(t,e.length))}return i}(a)){const t=c(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===n)}has(e){return this._parsed.has(e)}set(...e){let[t,r,n]=1===e.length?[e[0].name,e[0].value,e[0]]:e,a=this._parsed;return a.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...n})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=p(r);t.append("set-cookie",e)}}(a,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(p).join("; ")}}},912714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},666680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},750227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},660526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},902157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},224361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},688947,(e,t,r)=>{t.exports=e.x("stream",()=>require("stream"))},427699,(e,t,r)=>{t.exports=e.x("events",()=>require("events"))},228064,e=>{"use strict";var t=e.i(666680),r=e.i(912714),n=e.i(660526),a=e.i(750227),s=e.i(832852);let i="__registry__",o=new Map;function l(){let e=process.env.HOME??n.default.homedir();return a.default.join(e,".wiki-viewer")}function u(){return a.default.join(l(),"agents.json")}function p(e){return(0,t.createHash)("sha256").update(e,"utf8").digest("hex")}async function d(){try{let e=await (0,r.readFile)(u(),"utf8"),t=JSON.parse(e);return{version:1,agents:Array.isArray(t.agents)?t.agents:[]}}catch{return null}}async function c(e){await (0,r.mkdir)(l(),{recursive:!0});let t=u()+".tmp";await (0,r.writeFile)(t,JSON.stringify(e,null,2),{encoding:"utf8",mode:384});try{await (0,r.chmod)(t,384)}catch{}await (0,r.rename)(t,u())}async function g(){let e=await d();if(e)return e;let t={version:1,agents:[]};return await c(t),t}async function h(e){let r=await d();if(!r)return null;let n=p(e);for(let e of r.agents)if(function(e,r){let n=Buffer.from(e.padEnd(64,"0"),"utf8"),a=Buffer.from(r.padEnd(64,"0"),"utf8");return n.length===a.length&&(0,t.timingSafeEqual)(n,a)&&e.length===r.length}(e.tokenHash,n))return e;return null}async function f(e){let t=await d();return t?t.agents.find(t=>t.id===e)??null:null}async function m(e){await (0,s.withFileMutex)(i,async()=>{let t=await g(),r=t.agents.findIndex(t=>t.id===e.id);r>=0?t.agents[r]=e:t.agents.push(e),await c(t)})}async function y(e){return(0,s.withFileMutex)(i,async()=>{let t=await d();if(!t)return!1;let r=t.agents.length;return t.agents=t.agents.filter(t=>t.id!==e),t.agents.length!==r&&(await c(t),!0)})}async function v(e){Date.now()-(o.get(e)??0)<3e4||await (0,s.withFileMutex)(i,async()=>{let t=await d();if(!t)return;let r=t.agents.find(t=>t.id===e);r&&(r.lastSeen=new Date().toISOString(),o.set(e,Date.now()),await c(t))})}e.s(["addAgent",0,m,"hashToken",0,p,"lookupAgentById",0,f,"lookupAgentByToken",0,h,"readRegistry",0,d,"removeAgent",0,y,"updateLastSeen",0,v])},413895,e=>{"use strict";var t=e.i(666680);let r=globalThis;r.__wvPendingRegs||(r.__wvPendingRegs=new Map);let n=r.__wvPendingRegs;e.s(["approveRegistration",0,function(e,t,r){let a=n.get(e);return!!a&&"pending"===a.status&&(a.status="approved",a.tokenPlaintext=t,a.resolvedAt=new Date().toISOString(),r&&(a.warning=r),!0)},"consumeRegistration",0,function(e){let t=n.get(e);if(!t||"approved"!==t.status||!t.tokenPlaintext)return null;let r=t.tokenPlaintext;return t.status="consumed",t.tokenPlaintext=void 0,r},"createRegistration",0,function(e){let r=`reg_${(0,t.randomBytes)(16).toString("hex")}`,a={registrationId:r,agentId:e.agentId,displayName:e.displayName,requestedScope:e.requestedScope??{paths:["**/*"],ops:["read","mutate"]},requestedAt:new Date().toISOString(),status:"pending"};return n.set(r,a),a},"denyRegistration",0,function(e){let t=n.get(e);return!!t&&"pending"===t.status&&(t.status="denied",t.resolvedAt=new Date().toISOString(),!0)},"getRegistration",0,function(e){return n.get(e)},"listPendingRegistrations",0,function(){return[...n.values()].filter(e=>"pending"===e.status)}])},563851,e=>{"use strict";var t=e.i(750227),r=e.i(660526),n=e.i(902157),a=e.i(666680);let s=()=>t.default.join(process.env.HOME??r.default.homedir(),".wiki-viewer","service-token");function i(){return(0,n.existsSync)(s())?(0,n.readFileSync)(s(),"utf-8").trim():""}e.s(["getServiceToken",0,i,"isServiceTokenRequest",0,function(e){let t=e.headers.get("x-service-token")?.trim()??"";return t.length>0&&function(e){let t=i();if(!t||!e||t.length!==e.length)return!1;try{return(0,a.timingSafeEqual)(Buffer.from(t,"utf-8"),Buffer.from(e,"utf-8"))}catch{return!1}}(t)},"rotateServiceToken",0,function(){(0,n.mkdirSync)(t.default.dirname(s()),{recursive:!0});let e=`wv_svc_${(0,a.randomBytes)(32).toString("hex")}`;(0,n.writeFileSync)(s(),e,{mode:384});try{(0,n.chmodSync)(s(),384)}catch{}return e}])},340707,e=>{"use strict";var t=e.i(351216),r=e.i(666680),n=e.i(413895),a=e.i(228064),s=e.i(563851);let i=globalThis;i.__wvRegBuckets||(i.__wvRegBuckets=new Map);let o=i.__wvRegBuckets,l=/^ai:[a-z][a-z0-9-]{0,30}$/i,u=new Set(["read","mutate","delete"]);function p(e){let t;if(!Array.isArray(e.paths)||0===e.paths.length||e.paths.length>20)return{error:"scope.paths must be an array of 1–20 glob pattern strings"};for(let t of e.paths)if("string"!=typeof t||t.length<1||t.length>200)return{error:"Each scope.paths entry must be a string of 1–200 characters"};if(!Array.isArray(e.ops)||0===e.ops.length)return{error:"scope.ops must be a non-empty array"};for(let t of e.ops)if(!u.has(t))return{error:'scope.ops values must be "read", "mutate", or "delete"'};if(void 0!==e.workspaceId){if("string"!=typeof e.workspaceId||e.workspaceId.length<1||e.workspaceId.length>64)return{error:"scope.workspaceId must be a string of 1–64 characters"};t=e.workspaceId}return{paths:e.paths,ops:e.ops,...void 0!==t?{workspaceId:t}:{}}}async function d(e){var i,u;let d,c,g,h;if(i=(e.headers.get("x-forwarded-for")??"").split(",")[0]?.trim()||"__global__",(c=o.get(i))||(c={tokens:10,lastRefillAt:Date.now()},o.set(i,c)),u=c,(h=Math.floor(((g=Date.now())-u.lastRefillAt)/6e3))>0&&(u.tokens=Math.min(10,u.tokens+h),u.lastRefillAt=g),!(c.tokens>0)||(c.tokens--,0))return t.NextResponse.json({error:"RATE_LIMITED",message:"Too many registration attempts"},{status:429});try{d=await e.json()}catch{return t.NextResponse.json({error:"INVALID_PAYLOAD",message:"Invalid JSON"},{status:400})}if("string"!=typeof d.id||!l.test(d.id))return t.NextResponse.json({error:"INVALID_PAYLOAD",message:"id must match /^ai:[a-z][a-z0-9-]{0,30}$/i (e.g. ai:claude)"},{status:400});if("string"!=typeof d.displayName||d.displayName.trim().length<1||d.displayName.trim().length>80)return t.NextResponse.json({error:"INVALID_PAYLOAD",message:"displayName must be a string of 1–80 characters"},{status:400});let f=d.displayName.trim();if(void 0===d.scope||null===d.scope||"object"!=typeof d.scope||Array.isArray(d.scope))return t.NextResponse.json({error:"INVALID_PAYLOAD",message:"scope is required"},{status:400});let m=p(d.scope);if("error"in m)return t.NextResponse.json({error:"INVALID_PAYLOAD",message:m.error},{status:400});if((0,s.isServiceTokenRequest)(e)){let e=await (0,a.lookupAgentById)(d.id),n=`wv_tok_${(0,r.randomBytes)(32).toString("hex")}`;return await (0,a.addAgent)({id:d.id,displayName:f,tokenHash:(0,a.hashToken)(n),scope:m,createdAt:new Date().toISOString(),lastSeen:new Date().toISOString()}),t.NextResponse.json({status:"approved",agentId:d.id,token:n,...e?{warning:`Replaced the existing token for ${d.id}; the previous token is now invalid.`}:{}},{status:200})}let y=(0,n.createRegistration)({agentId:d.id,displayName:f,requestedScope:m});return t.NextResponse.json({registrationId:y.registrationId,pollUrl:`/api/agent/register/${y.registrationId}`,status:"pending"},{status:202})}e.s(["POST",0,d,"runtime",0,"nodejs","validateScope",0,p],340707)},938179,e=>{"use strict";var t=e.i(985426),r=e.i(257574),n=e.i(507835),a=e.i(457789),s=e.i(119791),i=e.i(141062),o=e.i(957291),l=e.i(535899),u=e.i(610241),p=e.i(62749),d=e.i(624891),c=e.i(725836),g=e.i(532736),h=e.i(257858),f=e.i(487476),m=e.i(193695);e.i(484264);var y=e.i(315709),v=e.i(340707);let x=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/agent/register/route",pathname:"/api/agent/register",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/agent/register/route.ts",nextConfigOutput:"standalone",userland:v,...{}}),{workAsyncStorage:w,workUnitAsyncStorage:R,serverHooks:A}=x;async function _(e,t,n){n.requestMeta&&(0,a.setRequestMeta)(e,n.requestMeta),x.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/agent/register/route";v=v.replace(/\/index$/,"")||"/";let w=await x.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:R,params:A,nextConfig:_,parsedUrl:S,isDraftMode:k,prerenderManifest:b,routerServerContext:I,isOnDemandRevalidate:O,revalidateOnlyGenerated:E,resolvedPathname:C,clientReferenceManifest:N,serverActionsManifest:j}=w,P=(0,o.normalizeAppPath)(v),q=!!(b.dynamicRoutes[P]||b.routes[C]),D=async()=>((null==I?void 0:I.render404)?await I.render404(e,t,S,!1):t.end("This page could not be found"),null);if(q&&!k){let e=!!b.routes[C],t=b.dynamicRoutes[P];if(t&&!1===t.fallback&&!e){if(_.adapterPath)return await D();throw new m.NoFallbackError}}let T=null;!q||x.isDev||k||(T="/index"===(T=C)?"/":T);let M=!0===x.isDev||!q,$=q&&!M;j&&N&&(0,i.setManifestsSingleton)({page:v,clientReferenceManifest:N,serverActionsManifest:j});let H=e.method||"GET",U=(0,s.getTracer)(),B=U.getActiveScopeSpan(),L=!!(null==I?void 0:I.isWrappedByNextServer),F=!!(0,a.getRequestMeta)(e,"minimalMode"),K=(0,a.getRequestMeta)(e,"incrementalCache")||await x.getIncrementalCache(e,_,b,F);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let V={params:A,previewProps:b.preview,renderOpts:{experimental:{authInterrupts:!!_.experimental.authInterrupts},cacheComponents:!!_.cacheComponents,supportsDynamicResponse:M,incrementalCache:K,cacheLifeProfiles:_.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>x.onRequestError(e,t,n,a,I)},sharedContext:{buildId:R}},z=new l.NodeNextRequest(e),J=new l.NodeNextResponse(t),Y=u.NextRequestAdapter.fromNodeNextRequest(z,(0,u.signalFromNodeResponse)(t));try{let a,i=async e=>x.handle(Y,V).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=U.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${H} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),a&&a!==e&&(a.setAttribute("http.route",n),a.updateName(t))}else e.updateName(`${H} ${v}`)}),o=async a=>{var s,o;let l=async({previousCacheEntry:r})=>{try{if(!F&&O&&E&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(a);e.fetchMetrics=V.renderOpts.fetchMetrics;let o=V.renderOpts.pendingWaitUntil;o&&n.waitUntil&&(n.waitUntil(o),o=void 0);let l=V.renderOpts.collectedTags;if(!q)return await (0,c.sendResponse)(z,J,s,V.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,g.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!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,n=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:V.renderOpts.collectedExpire;return{value:{kind:y.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await x.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:O})},!1,I),t}},u=await x.handleResponse({req:e,nextConfig:_,cacheKey:T,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:b,isRoutePPREnabled:!1,isOnDemandRevalidate:O,revalidateOnlyGenerated:E,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:F});if(!q)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==y.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});F||t.setHeader("x-nextjs-cache",O?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),k&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let p=(0,g.fromNodeOutgoingHttpHeaders)(u.value.headers);return F&&q||p.delete(f.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||p.get("Cache-Control")||p.set("Cache-Control",(0,h.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(z,J,new Response(u.value.body,{headers:p,status:u.value.status||200})),null};L&&B?await o(B):(a=U.getActiveScopeSpan(),await U.withPropagatedContext(e.headers,()=>U.trace(p.BaseServerSpan.handleRequest,{spanName:`${H} ${v}`,kind:s.SpanKind.SERVER,attributes:{"http.method":H,"http.target":e.url}},o),void 0,!L))}catch(t){if(t instanceof m.NoFallbackError||await x.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:O})},!1,I),q)throw t;return await (0,c.sendResponse)(z,J,new Response(null,{status:500})),null}}e.s(["handler",0,_,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:R})},"routeModule",0,x,"serverHooks",0,A,"workAsyncStorage",0,w,"workUnitAsyncStorage",0,R])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0puvgme._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[918622,(e,t,n)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},324725,(e,t,n)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},270406,(e,t,n)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},193695,(e,t,n)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},100705,(e,t,n)=>{"use strict";t.exports=e.r(918622)},294382,(e,t,n)=>{"use strict";t.exports=e.r(100705).vendored["react-rsc"].React},362744,(e,t,n)=>{"use strict";var r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o={},l={RequestCookies:()=>f,ResponseCookies:()=>g,parseCookie:()=>c,parseSetCookie:()=>u,stringifyCookie:()=>p};for(var d in l)r(o,d,{get:l[d],enumerable:!0});function p(e){var t;let n=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),r=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===n.length?r:`${r}; ${n.join("; ")}`}function c(e){let t=new Map;for(let n of e.split(/; */)){if(!n)continue;let e=n.indexOf("=");if(-1===e){t.set(n,"true");continue}let[r,a]=[n.slice(0,e),n.slice(e+1)];try{t.set(r,decodeURIComponent(null!=a?a:"true"))}catch{}}return t}function u(e){if(!e)return;let[[t,n],...r]=c(e),{domain:a,expires:s,httponly:i,maxage:o,path:l,samesite:d,secure:p,partitioned:u,priority:f}=Object.fromEntries(r.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var g,v,y={name:t,value:decodeURIComponent(n),domain:a,...s&&{expires:new Date(s)},...i&&{httpOnly:!0},..."string"==typeof o&&{maxAge:Number(o)},path:l,...d&&{sameSite:h.includes(g=(g=d).toLowerCase())?g:void 0},...p&&{secure:!0},...f&&{priority:m.includes(v=(v=f).toLowerCase())?v:void 0},...u&&{partitioned:!0}};let e={};for(let t in y)y[t]&&(e[t]=y[t]);return e}}t.exports=((e,t,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of s(t))i.call(e,o)||void 0===o||r(e,o,{get:()=>t[o],enumerable:!(n=a(t,o))||n.enumerable});return e})(r({},"__esModule",{value:!0}),o);var h=["strict","lax","none"],m=["low","medium","high"],f=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,n]of c(t))this._parsed.set(e,{name:e,value:n})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let n=Array.from(this._parsed);if(!e.length)return n.map(([e,t])=>t);let r="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return n.filter(([e])=>e===r).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,n]=1===e.length?[e[0].name,e[0].value]:e,r=this._parsed;return r.set(t,{name:t,value:n}),this._headers.set("cookie",Array.from(r).map(([e,t])=>p(t)).join("; ")),this}delete(e){let t=this._parsed,n=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>p(t)).join("; ")),n}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},g=class{constructor(e){var t,n,r;this._parsed=new Map,this._headers=e;const a=null!=(r=null!=(n=null==(t=e.getSetCookie)?void 0:t.call(e))?n:e.get("set-cookie"))?r:[];for(const e of Array.isArray(a)?a:function(e){if(!e)return[];var t,n,r,a,s,i=[],o=0;function l(){for(;o<e.length&&/\s/.test(e.charAt(o));)o+=1;return o<e.length}for(;o<e.length;){for(t=o,s=!1;l();)if(","===(n=e.charAt(o))){for(r=o,o+=1,l(),a=o;o<e.length&&"="!==(n=e.charAt(o))&&";"!==n&&","!==n;)o+=1;o<e.length&&"="===e.charAt(o)?(s=!0,o=a,i.push(e.substring(t,r)),t=o):o=r+1}else o+=1;(!s||o>=e.length)&&i.push(e.substring(t,e.length))}return i}(a)){const t=u(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let n=Array.from(this._parsed.values());if(!e.length)return n;let r="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return n.filter(e=>e.name===r)}has(e){return this._parsed.has(e)}set(...e){let[t,n,r]=1===e.length?[e[0].name,e[0].value,e[0]]:e,a=this._parsed;return a.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:n,...r})),function(e,t){for(let[,n]of(t.delete("set-cookie"),e)){let e=p(n);t.append("set-cookie",e)}}(a,this._headers),this}delete(...e){let[t,n]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...n,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(p).join("; ")}}},754297,e=>{"use strict";e.s(["SKILL_MD",0,'---\nname: wiki-viewer\ndescription: Read and edit markdown files in a running wiki-viewer instance over its HTTP collab API. Use when the user mentions wiki-viewer, asks you to edit local notes, or shares a localhost wiki-viewer URL. Handles agent registration, scoped capabilities, block-level edits with audit-log provenance, comments, and suggestions.\nlicense: MIT\n---\n\n# wiki-viewer agent skill\n\nYou are working with **wiki-viewer**, a local-first markdown viewer that exposes an HTTP API for agents. Files on disk are the source of truth. Every AI-authored edit writes clean markdown; provenance is recorded in the activity feed.\n\n## Quick orientation: two tiers\n\n| Tier | Routes | File types | When to use |\n| ------------------- | ----------------------- | ----------------------------------- | --------------------------------------------------------------------------------- |\n| **Tier 1 — Raw FS** | `/api/agent/fs/*` | All types (markdown, code, binary…) | Fast filework. Read, write, list, move, delete, search. Audited but no review UI. |\n| **Tier 2 — Collab** | `/api/agent/files/*.md` | Markdown only | Block-scoped concurrency-safe writes with activity-log provenance. |\n\nBoth tiers use the same auth (TOFU token). Pick the tier based on `X-Collab-State` (see [Which tier do I use?](#which-tier-do-i-use)).\n\n---\n\n## Discovery\n\nThe server publishes everything you need at one URL:\n\n```\nGET http://<host>:<port>/api/agents/install\n```\n\nThis returns JSON with: bootstrap instructions, route table, op vocabulary, the current registration endpoint, and the human-facing approval workflow. Fetch this first and treat it as authoritative for the running instance you\'re talking to.\n\nIf the user pasted only the wiki-viewer URL, append `/api/agents/install` and fetch it before doing anything else.\n\n## Authentication\n\nwiki-viewer uses **TOFU (Trust On First Use)**:\n\n1. You register anonymously. Server stores a pending request.\n2. The human approves you in the wiki-viewer AI Panel.\n3. You poll, receive a one-shot token, and use it from then on.\n\n**Fast path (same machine only):** when running directly on the wiki-viewer host, send your registration with the header `X-Service-Token: <contents of ~/.wiki-viewer/service-token>` (0600, written by the server at startup, shown/rotated in Settings). Registration then auto-approves: the response is `200 {status:"approved", agentId, token}` immediately — no pending state, no polling, no approval step. Requested scope is granted as-is. Tell the human only if the fast path is rejected.\n\n### Register\n\n```\nPOST /api/agent/register\nContent-Type: application/json\n\n{\n "id": "ai:<your-name>",\n "displayName": "<readable name>",\n "scope": {\n "paths": ["**/*"],\n "ops": ["read", "mutate"]\n }\n}\n```\n\n- `id` must match `^ai:[a-z][a-z0-9-]{0,30}$`. Pick something stable per agent identity (e.g. `ai:claude`, `ai:cursor`, `ai:my-script`).\n- `displayName` 1-80 chars. What the human sees in the approval UI.\n- `scope.paths` is a glob list. Use `**/*` for full repo access, or restrict to a subtree like `notes/**`.\n- `scope.ops` ⊆ `["read", "mutate"]` (add `"delete"` if you need to remove files).\n- `scope.workspaceId` (optional): pin this grant to a single workspace id. Omit\n to request a wildcard grant usable in any workspace (the human can still narrow\n it at approval time).\n\nResponse:\n\n```json\n{\n "registrationId": "reg_<32hex>",\n "pollUrl": "/api/agent/register/<regId>",\n "status": "pending"\n}\n```\n\n**Tell the human**: "Open the wiki-viewer AI Panel and approve my registration."\n\n(With a service-token header you won\'t reach this step — see the fast path above.)\n\n### Poll\n\n```\nGET /api/agent/register/<registrationId>\n```\n\n- `202 {status:"pending"}` — keep polling, every 2-5s.\n- `200 {status:"approved", agentId, token}` — capture token immediately. Pickup is **one-shot**; you cannot fetch it again.\n- `410 {status:"denied"}` or `{status:"consumed"}` — abort or restart registration.\n- `404` — registration expired, re-register.\n\n### Use the token\n\nEvery subsequent request:\n\n```\nAuthorization: Bearer <token>\nX-Agent-Id: ai:<your-name>\nX-Workspace: <workspaceId> # optional but recommended (see Workspaces)\n```\n\nThe `X-Agent-Id` must match the id the token was issued for. Spoofing rejected with `401`.\n\n## Workspaces\n\nA wiki-viewer instance can serve **multiple root directories ("workspaces")**\nat once. Every file path you use is relative to **one** workspace\'s root.\n\n- **Targeting a workspace:** send an `X-Workspace: <workspaceId>` header on every\n request (or append `?ws=<workspaceId>` to the URL). If you omit it, the server\n resolves to a default (the most-recently-opened workspace), which is correct\n for a single-workspace instance but ambiguous when several exist — so prefer\n to be explicit.\n- **Discovering workspace ids:** `GET /api/agent/settings` returns the resolved\n `root` (the active workspace\'s directory) for whatever `X-Workspace` you send.\n The human picks/creates workspaces in the UI; ask them for the id, or read it\n from the `?ws=` param in a wiki-viewer URL they pasted.\n- **Scoped grants:** your token may be pinned to one workspace at approval time.\n A request that resolves to a different workspace is rejected `403 FORBIDDEN`.\n A token with no workspace pin works against any workspace (wildcard).\n- **Isolation:** paths in workspace A never touch workspace B, even if they share\n the same relative path (`notes.md` in A ≠ `notes.md` in B).\n\nWhenever the human is working in a specific workspace, capture its id once and\nsend `X-Workspace: <id>` on all subsequent calls.\n\n## Reading\n\n```\nGET /api/agent/files/<url-encoded-path>.md\n```\n\nReturns a Snapshot:\n\n```json\n{\n "path": "notes/plan.md",\n "revision": 7,\n "fingerprint": "sha256:...",\n "blocks": [\n { "ref": "b1a3f0", "type": "heading", "level": 1, "markdown": "# Plan" },\n { "ref": "b7f2c1", "type": "paragraph", "markdown": "Ship in June." }\n ],\n "comments": [...],\n "suggestions": [...],\n "lastEventId": 12\n}\n```\n\nBlock `ref` strings are stable across edits. Use them to target mutations. **Always read a fresh snapshot before mutating** so you have the current `revision`.\n\n## Mutating\n\n```\nPOST /api/agent/files/<path>.md\nAuthorization: Bearer <token>\nX-Agent-Id: ai:<your-name>\nContent-Type: application/json\nIdempotency-Key: <uuid you generate per request>\n\n{\n "baseRevision": <revision from snapshot>,\n "by": "ai:<your-name>",\n "ops": [ <op>, ... ]\n}\n```\n\nRequirements:\n\n- `Idempotency-Key` header mandatory. Same key + same body within 5 minutes returns the cached response. Same key + different body returns `409 IDEMPOTENCY_KEY_REUSED`.\n- `by` must equal your `X-Agent-Id` or you get `403 FORBIDDEN`.\n- If `baseRevision` is stale, response is `409 STALE_REVISION` with a fresh snapshot. Read the new revision, rebuild your op against current refs, retry.\n\n### Op vocabulary\n\n**Block ops** — content edits:\n\n```json\n{ "type": "block.replace", "ref": "b7f2c1", "markdown": "New content." }\n{ "type": "block.insertAfter", "ref": "b7f2c1", "markdown": "..." }\n{ "type": "block.insertBefore", "ref": "b7f2c1", "markdown": "..." }\n{ "type": "block.delete", "ref": "b7f2c1" }\n{ "type": "block.append", "markdown": "..." }\n{ "type": "block.prepend", "markdown": "..." }\n```\n\nBlock ops write clean markdown verbatim. Provenance is recorded in the activity feed, not document bytes. Legacy `basis`, `basisDetail`, and `inResponseTo` fields remain accepted but are ignored for backward compatibility.\n\n**Comment ops** — threaded discussion attached to a block:\n\n```json\n{ "type": "comment.add", "ref": "b7f2c1", "text": "Why end of June?" }\n{ "type": "comment.reply", "commentId": "c4a1", "text": "Because of API freeze." }\n{ "type": "comment.resolve", "commentId": "c4a1" }\n{ "type": "comment.reopen", "commentId": "c4a1" }\n```\n\n**Suggestion ops** — proposed edits the human must accept:\n\n```json\n{\n "type": "suggestion.add",\n "ref": "b7f2c1",\n "kind": "replace",\n "markdown": "Ship the rewrite by July 15.",\n "basis": "described",\n "basisDetail": "user mentioned slippage in chat"\n}\n```\n\nSuggestion kinds: `"replace" | "insertAfter" | "insertBefore" | "delete"`.\n\nSuggestions are separate UI objects for proposed edits. Direct block ops commit clean markdown immediately; both actions are recorded in audit/activity logs.\n\n## Polling events\n\n```\nGET /api/agent/events/<path>.md?after=<lastEventId>\n```\n\nReturns events emitted since `lastEventId`: human comments, accepted suggestions, external file edits (the human opened the file in vim), and so on. Use this to react when the human responds to one of your comments or suggestions.\n\nAcknowledge:\n\n```\nPOST /api/agent/events/<path>.md\n{ "upToId": <id>, "by": "ai:<your-name>" }\n```\n\nAcks are advisory; events are never deleted.\n\n## Error codes\n\n| Status | Code | Meaning |\n| ------ | ---------------------- | --------------------------------------------------------------------------------------- |\n| 401 | UNAUTHORIZED | bad/missing token or X-Agent-Id |\n| 403 | FORBIDDEN | scope/path mismatch, workspace not covered by grant, or `by` doesn\'t match `X-Agent-Id` |\n| 404 | FILE_NOT_FOUND | path doesn\'t exist under server root |\n| 409 | STALE_REVISION | `baseRevision` wrong, retry with included snapshot |\n| 409 | BLOCK_NOT_FOUND | ref no longer exists, refetch snapshot |\n| 409 | IDEMPOTENCY_KEY_REUSED | same key, different body |\n| 422 | INVALID_MARKDOWN | op\'s markdown failed to parse |\n| 429 | RATE_LIMITED | bucket exhausted, honor `Retry-After` header |\n\n---\n\n## Working with files (raw filesystem — Tier 1)\n\nAll Tier-1 routes require `Authorization: Bearer <token>` + `X-Agent-Id: ai:<name>` (same as Tier 2). The agent\'s `scope.paths` glob applies to every surface (reads, ls results, search results, move, delete).\n\n### Scope ops\n\nWhen registering, `scope.ops` can include:\n\n- `read` — read files + list + search\n- `mutate` — create / overwrite / move\n- `delete` — remove files/dirs (separate from mutate so a human can grant edit-but-never-delete)\n\nExample registration with full access:\n\n```json\n{\n "id": "ai:claude",\n "scope": { "paths": ["**/*"], "ops": ["read", "mutate", "delete"] }\n}\n```\n\n### Read a file\n\n```\nGET /api/agent/fs/file/<path>\n```\n\nReturns raw bytes. Metadata in response headers:\n\n```\nETag: "<sha256>"\nX-File-Size: <bytes>\nX-File-Mtime: <ISO-8601>\nContent-Type: <mime>\nX-Collab-State: active | tracked | untracked | not-markdown\nX-Collab-Revision: <n>\nX-Collab-Snapshot: /api/agent/files/<path>.md # when applicable\n```\n\nSupports `Range` header for large/binary files.\n\n### Write a file\n\n```\nPUT /api/agent/fs/file/<path>\nIf-Match: "<sha256>" # required for overwrites; omit for creates\nContent-Type: <mime>\n<raw bytes body>\n```\n\n- **Create** (file doesn\'t exist): omit `If-Match`. Creating a file that already exists without `If-Match` → 412 (no blind clobber).\n- **Overwrite** (file exists): send `If-Match` with the sha256 you read. Mismatch → 412.\n- `?mkdirs=true` — create parent directories.\n- `?force=true` — bypass `If-Match` check (audited; use sparingly).\n\nFor `.md` files, also send:\n\n```\nIf-Collab-Match: <X-Collab-Revision> # prevents writing into a live collab session\n```\n\n(See [Which tier do I use?](#which-tier-do-i-use).)\n\nResponse:\n\n```json\n{\n "path": "...",\n "sha256": "...",\n "size": 1234,\n "mtime": "...",\n "created": false\n}\n```\n\n### Delete a file\n\n```\nDELETE /api/agent/fs/file/<path>\nIf-Match: "<sha256>" # required — you must have read the file first\n```\n\nRequires `delete` in `scope.ops`. Deletes the `.proof/` sidecar too for `.md` files. For directories: `?recursive=true`.\n\n### List a directory\n\n```\nGET /api/agent/fs/ls/<path>?recursive=true&limit=500&depth=3\n```\n\nReturns `{ entries: [{name, type, path, size, mtime}] }`. Unauthorized paths silently omitted. Excludes `.proof/`.\n\n### Move / rename\n\n```\nPOST /api/agent/fs/move\nContent-Type: application/json\n\n{ "from": "notes/old.md", "to": "notes/new.md", "ifMatch": "<sha256>" }\n```\n\nMoves the `.proof/` sidecar for `.md` files automatically.\n\n### Search (grep / glob)\n\n```\nPOST /api/agent/fs/search\nContent-Type: application/json\n\n{ "kind": "grep", "query": "TODO", "path": "src", "glob": "*.ts", "limit": 100 }\n```\n\n```\nPOST /api/agent/fs/search\nContent-Type: application/json\n\n{ "kind": "glob", "query": "**/*.test.ts" }\n```\n\nServer-side: one call replaces dozens of `ls`+`read` round-trips. Results are scope-filtered. Glob dialect: `**`, `*`, `?` only (no braces/negation in v1).\n\n### Error codes (Tier 1)\n\n| Status | Code | Meaning |\n| ------ | ------------------- | --------------------------------------------------------------------------- |\n| 400 | BAD_REQUEST | Invalid path or body |\n| 401 | UNAUTHORIZED | Bad/missing token or X-Agent-Id |\n| 403 | FORBIDDEN | Scope mismatch or missing `delete` op |\n| 404 | NOT_FOUND | Path doesn\'t exist |\n| 409 | COLLAB_ACTIVE | Raw PUT rejected — doc is active-collab; use Tier-2 or send If-Collab-Match |\n| 412 | PRECONDITION_FAILED | If-Match sha mismatch (concurrent modification) |\n| 413 | PAYLOAD_TOO_LARGE | File exceeds 50 MB limit |\n| 429 | RATE_LIMITED | Honor `Retry-After` |\n\n---\n\n## Which tier do I use?\n\nEvery `GET /api/agent/fs/file/<path>` (and every Tier-2 snapshot read) returns `X-Collab-State`.\n\n| `X-Collab-State` | Meaning | Use |\n| ---------------- | --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |\n| `active` | Human has this `.md` open in the editor, OR it has pending suggestions / unresolved comments. | **Tier 2 block-ops only.** A raw `PUT` returns `409 COLLAB_ACTIVE`. |\n| `tracked` | `.md` has a sidecar (prior collab history), no active session. | Prefer Tier-2 for prose/semantic edits. Raw ok for mechanical/whole-file ops (reformat, regenerate). |\n| `untracked` | `.md`, no sidecar yet. | Raw is fine. Tier-2 creates a sidecar (starts provenance tracking). |\n| `not-markdown` | Any non-`.md` file. | **Tier-1 raw only.** Tier 2 does not apply. |\n\n**Rule (one sentence):** Read the file, check `X-Collab-State`, use Tier-2 if `active`, else use Tier-1. For non-markdown, always Tier-1.\n\n**Editing a `.md` safely:**\n\n```\n1. GET /api/agent/fs/file/<path>.md\n → note ETag (sha256) and X-Collab-Revision + X-Collab-State\n\n2a. If X-Collab-State == "active":\n → POST /api/agent/files/<path>.md (block-ops, Tier-2)\n Use the X-Collab-Snapshot URL. See "Mutating" section below.\n\n2b. Otherwise (tracked / untracked):\n → PUT /api/agent/fs/file/<path>.md (raw Tier-1)\n If-Match: "<ETag from step 1>"\n If-Collab-Match: <X-Collab-Revision from step 1>\n\n3. If you get 409 COLLAB_ACTIVE: the doc became active after your read.\n Switch to Tier-2 (block-ops) using the URL in the response body.\n```\n\n**MCP-capable agents:** run `npx wiki-viewer-mcp` (set `WIKI_VIEWER_URL`, `WIKI_VIEWER_TOKEN`, `WIKI_VIEWER_AGENT_ID`; its `register` command auto-approves when a service token is available). It exposes **Tier-1 file tools only** — `read_file`, `write_file`, `edit_file`, `list_directory`, `search`, `move_file`, `delete_file` — and reads `X-Collab-State` so it won\'t clobber an active doc: it blocks the write and tells you to use the collaborative path instead. The MCP shim has **no Tier-2 (block-ops / suggestion / comment) tools** — to co-write a doc, use the Tier-2 HTTP endpoints described above directly (the skill instructions cover them). Use the MCP for fast filework; use Tier-2 HTTP for reviewable doc collaboration.\n\n---\n\n## Working style\n\n- Read before write. Always GET a fresh snapshot to capture current `revision` and block `ref`s.\n- One file per request. There is no batch-across-files endpoint.\n- Atomic ops. Each POST applies all its ops or none. Order matters within a batch.\n- Write clean markdown. Legacy `basis`, `basisDetail`, and `inResponseTo` fields are accepted but ignored for backward compatibility.\n- Prefer comments and suggestions over silent edits. The human is your collaborator, not your reviewer-of-last-resort.\n- Poll events between turns when the human is reviewing your work; respond to their comments rather than re-litigating.\n\n## Sample first interaction\n\n```\n1. GET /api/agents/install # discovery\n2. POST /api/agent/register # register (include "delete" in ops if needed)\n # on the server host? add X-Service-Token -> token comes back instantly, skip 3-4\n3. tell human: "approve me in the AI Panel"\n4. GET /api/agent/register/<regId> # poll until approved\n\n# Working mode (Tier-1, e.g. code files or untracked .md)\n5. GET /api/agent/fs/ls/src?recursive=true # list\n6. GET /api/agent/fs/file/src/main.ts # read -> capture ETag\n7. PUT /api/agent/fs/file/src/main.ts (If-Match: <sha>) # write\n\n# Collaborating mode (Tier-2, active .md)\n5. GET /api/agent/fs/file/notes/plan.md # read -> X-Collab-State: active\n6. GET /api/agent/files/notes/plan.md # read snapshot (Tier-2)\n7. POST /api/agent/files/notes/plan.md # suggest or mutate (Tier-2)\n8. GET /api/agent/events/notes/plan.md?after=<id> # listen for replies\n```\n'])},107836,e=>{"use strict";var t=e.i(985426),n=e.i(257574),r=e.i(507835),a=e.i(457789),s=e.i(119791),i=e.i(141062),o=e.i(957291),l=e.i(535899),d=e.i(610241),p=e.i(62749),c=e.i(624891),u=e.i(725836),h=e.i(532736),m=e.i(257858),f=e.i(487476),g=e.i(193695);e.i(484264);var v=e.i(315709),y=e.i(351216),w=e.i(754297);async function b(e){return new y.NextResponse(w.SKILL_MD,{status:200,headers:{"Content-Type":"text/markdown; charset=utf-8","Cache-Control":"no-store"}})}e.s(["GET",0,b,"runtime",0,"nodejs"],480242);var k=e.i(480242);let T=new t.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/agents/skill/route",pathname:"/api/agents/skill",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/agents/skill/route.ts",nextConfigOutput:"standalone",userland:k,...{}}),{workAsyncStorage:R,workUnitAsyncStorage:E,serverHooks:I}=T;async function x(e,t,r){r.requestMeta&&(0,a.setRequestMeta)(e,r.requestMeta),T.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let y="/api/agents/skill/route";y=y.replace(/\/index$/,"")||"/";let w=await T.prepare(e,t,{srcPage:y,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:b,params:k,nextConfig:R,parsedUrl:E,isDraftMode:I,prerenderManifest:x,routerServerContext:A,isOnDemandRevalidate:C,revalidateOnlyGenerated:S,resolvedPathname:O,clientReferenceManifest:_,serverActionsManifest:P}=w,U=(0,o.normalizeAppPath)(y),D=!!(x.dynamicRoutes[U]||x.routes[O]),M=async()=>((null==A?void 0:A.render404)?await A.render404(e,t,E,!1):t.end("This page could not be found"),null);if(D&&!I){let e=!!x.routes[O],t=x.dynamicRoutes[U];if(t&&!1===t.fallback&&!e){if(R.adapterPath)return await M();throw new g.NoFallbackError}}let N=null;!D||T.isDev||I||(N="/index"===(N=O)?"/":N);let j=!0===T.isDev||!D,q=D&&!j;P&&_&&(0,i.setManifestsSingleton)({page:y,clientReferenceManifest:_,serverActionsManifest:P});let L=e.method||"GET",X=(0,s.getTracer)(),F=X.getActiveScopeSpan(),B=!!(null==A?void 0:A.isWrappedByNextServer),W=!!(0,a.getRequestMeta)(e,"minimalMode"),H=(0,a.getRequestMeta)(e,"incrementalCache")||await T.getIncrementalCache(e,R,x,W);null==H||H.resetRequestCache(),globalThis.__incrementalCache=H;let G={params:k,previewProps:x.preview,renderOpts:{experimental:{authInterrupts:!!R.experimental.authInterrupts},cacheComponents:!!R.cacheComponents,supportsDynamicResponse:j,incrementalCache:H,cacheLifeProfiles:R.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,n,r,a)=>T.onRequestError(e,t,r,a,A)},sharedContext:{buildId:b}},$=new l.NodeNextRequest(e),K=new l.NodeNextResponse(t),z=d.NextRequestAdapter.fromNodeNextRequest($,(0,d.signalFromNodeResponse)(t));try{let a,i=async e=>T.handle(z,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let n=X.getRootSpanAttributes();if(!n)return;if(n.get("next.span_type")!==p.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 r=n.get("next.route");if(r){let t=`${L} ${r}`;e.setAttributes({"next.route":r,"http.route":r,"next.span_name":t}),e.updateName(t),a&&a!==e&&(a.setAttribute("http.route",r),a.updateName(t))}else e.updateName(`${L} ${y}`)}),o=async a=>{var s,o;let l=async({previousCacheEntry:n})=>{try{if(!W&&C&&S&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(a);e.fetchMetrics=G.renderOpts.fetchMetrics;let o=G.renderOpts.pendingWaitUntil;o&&r.waitUntil&&(r.waitUntil(o),o=void 0);let l=G.renderOpts.collectedTags;if(!D)return await (0,u.sendResponse)($,K,s,G.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 n=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,r=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:r}}}}catch(t){throw(null==n?void 0:n.isStale)&&await T.onRequestError(e,t,{routerKind:"App Router",routePath:y,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:q,isOnDemandRevalidate:C})},!1,A),t}},d=await T.handleResponse({req:e,nextConfig:R,cacheKey:N,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:x,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:S,responseGenerator:l,waitUntil:r.waitUntil,isMinimalMode:W});if(!D)return null;if((null==d||null==(s=d.value)?void 0:s.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(o=d.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});W||t.setHeader("x-nextjs-cache",C?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),I&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let p=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return W&&D||p.delete(f.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||p.get("Cache-Control")||p.set("Cache-Control",(0,m.getCacheControlHeader)(d.cacheControl)),await (0,u.sendResponse)($,K,new Response(d.value.body,{headers:p,status:d.value.status||200})),null};B&&F?await o(F):(a=X.getActiveScopeSpan(),await X.withPropagatedContext(e.headers,()=>X.trace(p.BaseServerSpan.handleRequest,{spanName:`${L} ${y}`,kind:s.SpanKind.SERVER,attributes:{"http.method":L,"http.target":e.url}},o),void 0,!B))}catch(t){if(t instanceof g.NoFallbackError||await T.onRequestError(e,t,{routerKind:"App Router",routePath:U,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:q,isOnDemandRevalidate:C})},!1,A),D)throw t;return await (0,u.sendResponse)($,K,new Response(null,{status:500})),null}}e.s(["handler",0,x,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:R,workUnitAsyncStorage:E})},"routeModule",0,T,"serverHooks",0,I,"workAsyncStorage",0,R,"workUnitAsyncStorage",0,E],107836)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0~a6cyg._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},100705,(e,t,r)=>{"use strict";t.exports=e.r(918622)},294382,(e,t,r)=>{"use strict";t.exports=e.r(100705).vendored["react-rsc"].React},362744,(e,t,r)=>{"use strict";var s=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,a={},p={RequestCookies:()=>f,ResponseCookies:()=>x,parseCookie:()=>d,parseSetCookie:()=>c,stringifyCookie:()=>u};for(var l in p)s(a,l,{get:p[l],enumerable:!0});function u(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),s=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?s:`${s}; ${r.join("; ")}`}function d(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[s,n]=[r.slice(0,e),r.slice(e+1)];try{t.set(s,decodeURIComponent(null!=n?n:"true"))}catch{}}return t}function c(e){if(!e)return;let[[t,r],...s]=d(e),{domain:n,expires:i,httponly:o,maxage:a,path:p,samesite:l,secure:u,partitioned:c,priority:f}=Object.fromEntries(s.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var x,g,y={name:t,value:decodeURIComponent(r),domain:n,...i&&{expires:new Date(i)},...o&&{httpOnly:!0},..."string"==typeof a&&{maxAge:Number(a)},path:p,...l&&{sameSite:m.includes(x=(x=l).toLowerCase())?x:void 0},...u&&{secure:!0},...f&&{priority:h.includes(g=(g=f).toLowerCase())?g:void 0},...c&&{partitioned:!0}};let e={};for(let t in y)y[t]&&(e[t]=y[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of i(t))o.call(e,a)||void 0===a||s(e,a,{get:()=>t[a],enumerable:!(r=n(t,a))||r.enumerable});return e})(s({},"__esModule",{value:!0}),a);var m=["strict","lax","none"],h=["low","medium","high"],f=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of d(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let s="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===s).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,s=this._parsed;return s.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(s).map(([e,t])=>u(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>u(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},x=class{constructor(e){var t,r,s;this._parsed=new Map,this._headers=e;const n=null!=(s=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?s:[];for(const e of Array.isArray(n)?n:function(e){if(!e)return[];var t,r,s,n,i,o=[],a=0;function p(){for(;a<e.length&&/\s/.test(e.charAt(a));)a+=1;return a<e.length}for(;a<e.length;){for(t=a,i=!1;p();)if(","===(r=e.charAt(a))){for(s=a,a+=1,p(),n=a;a<e.length&&"="!==(r=e.charAt(a))&&";"!==r&&","!==r;)a+=1;a<e.length&&"="===e.charAt(a)?(i=!0,a=n,o.push(e.substring(t,s)),t=a):a=s+1}else a+=1;(!i||a>=e.length)&&o.push(e.substring(t,e.length))}return o}(n)){const t=c(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let s="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===s)}has(e){return this._parsed.has(e)}set(...e){let[t,r,s]=1===e.length?[e[0].name,e[0].value,e[0]]:e,n=this._parsed;return n.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...s})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=u(r);t.append("set-cookie",e)}}(n,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(u).join("; ")}}},750227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},912714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__13lwpvb._.js.map
|