@37chengshan/ompweb 0.3.5 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +6 -6
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/react-loadable-manifest.json +1 -1
  5. package/.next/required-server-files.js +2 -2
  6. package/.next/required-server-files.json +2 -2
  7. package/.next/server/app/_global-error.html +1 -1
  8. package/.next/server/app/_global-error.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  12. package/.next/server/app/_not-found.html +1 -1
  13. package/.next/server/app/_not-found.rsc +1 -1
  14. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  15. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  16. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  17. package/.next/server/app/api/agents/route.js +1 -1
  18. package/.next/server/app/api/app-update/route.js +1 -1
  19. package/.next/server/app/api/omp-version/route.js +1 -1
  20. package/.next/server/app/api/plugins/route.js +1 -1
  21. package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
  22. package/.next/server/app/index.html +1 -1
  23. package/.next/server/app/index.rsc +1 -1
  24. package/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  25. package/.next/server/app/index.segments/_full.segment.rsc +1 -1
  26. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  27. package/.next/server/app/login.html +1 -1
  28. package/.next/server/app/login.rsc +1 -1
  29. package/.next/server/app/login.segments/_full.segment.rsc +1 -1
  30. package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  31. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  32. package/.next/server/app-paths-manifest.json +6 -6
  33. package/.next/server/chunks/1671.js +1 -1
  34. package/.next/server/chunks/3798.js +4 -4
  35. package/.next/server/chunks/7834.js +3 -3
  36. package/.next/server/middleware-build-manifest.js +1 -1
  37. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  38. package/.next/server/pages/404.html +1 -1
  39. package/.next/server/pages/500.html +1 -1
  40. package/.next/static/chunks/{202.95416cc0d8e6df0e.js → 202.10de6e38a49a6c80.js} +1 -1
  41. package/.next/static/chunks/{webpack-2a4b77ae5d80a8ba.js → webpack-32eae552598b6ade.js} +1 -1
  42. package/README.ja.md +8 -2
  43. package/README.md +85 -40
  44. package/README.zh-CN.md +104 -63
  45. package/package.json +1 -1
  46. /package/.next/static/{cA3mF_wj2VN78irY68Wcm → RW6Yu4DRfKI1mQ_EqoVNo}/_buildManifest.js +0 -0
  47. /package/.next/static/{cA3mF_wj2VN78irY68Wcm → RW6Yu4DRfKI1mQ_EqoVNo}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (()=>{"use strict";var e,t,a,c,r,d,f,o,n,b={},i={};function l(e){var t=i[e];if(void 0!==t)return t.exports;var a=i[e]={exports:{}},c=!0;try{b[e].call(a.exports,a,a.exports,l),c=!1}finally{c&&delete i[e]}return a.exports}l.m=b,e=[],l.O=(t,a,c,r)=>{if(a){r=r||0;for(var d=e.length;d>0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[a,c,r];return}for(var f=1/0,d=0;d<e.length;d++){for(var[a,c,r]=e[d],o=!0,n=0;n<a.length;n++)(!1&r||f>=r)&&Object.keys(l.O).every(e=>l.O[e](a[n]))?a.splice(n--,1):(o=!1,r<f&&(f=r));if(o){e.splice(d--,1);var b=c();void 0!==b&&(t=b)}}return t},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},a=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,l.t=function(e,c){if(1&c&&(e=this(e)),8&c||"object"==typeof e&&e&&(4&c&&e.__esModule||16&c&&"function"==typeof e.then))return e;var r=Object.create(null);l.r(r);var d={};t=t||[null,a({}),a([]),a(a)];for(var f=2&c&&e;"object"==typeof f&&!~t.indexOf(f);f=a(f))Object.getOwnPropertyNames(f).forEach(t=>d[t]=()=>e[t]);return d.default=()=>e,l.d(r,d),r},l.d=(e,t)=>{for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},l.f={},l.e=e=>Promise.all(Object.keys(l.f).reduce((t,a)=>(l.f[a](e,t),t),[])),l.u=e=>2584===e?"static/chunks/2584-20a03146e1e2db70.js":"static/chunks/"+(({988:"993e5495",1048:"db9d41be",3888:"e868780c",7330:"d3ac728e",8133:"1ba63609",8747:"90542734",8924:"da12927c",9425:"bf2ff291"})[e]||e)+"."+({103:"23142a67b02246a8",202:"95416cc0d8e6df0e",268:"ec500965c1761e26",370:"8e8f3cf8eb0e29dd",394:"475e54c848486e3a",398:"ffa02af9062a3950",484:"c74eeb0fca9a9ddf",852:"60444b32fcbeb00c",869:"7152372b662e31af",918:"6a9bbe564e4a2d0f",934:"9006461bd0548660",973:"9efc01efd9d768a5",988:"598a97aa1337298f",1032:"d9a9179233599785",1048:"27ee8fcc7bf00d70",1063:"775c442bdbeef08b",1133:"0f37525b2b215f36",1327:"09252bb80616cc3a",1708:"c3a1896e4cc9f8d9",1781:"9072b4c9586df549",2081:"47b6e9391094055f",2181:"ba21239d3ac39f81",2201:"08d1cac24fc438ee",2258:"4defa30121ef44a5",2325:"23caf22075e51aa5",2356:"523277bb8c6bf72a",2414:"8b3662a85cd1b14e",2418:"b5d9e177e10a686e",2480:"cf27ca02e5b19761",2539:"c5a4f2fd8e421c70",2619:"9431a3f48da8eef4",2695:"b732ef1965253b3f",2703:"495a65ed14b2f094",2821:"934bcf60fbdc28c6",3251:"408c817adb161919",3308:"8e27b5c43a478f0d",3336:"a76f9485fe7cb762",3606:"ddd8065b4a3108bd",3716:"72bf4c9d7325debd",3888:"0440c4cbaec74878",3995:"eca0f5bef1fc3ae5",4004:"74b9bcf5478b1663",4202:"8440832386f023c7",4238:"6f102dcbcf2ae339",4405:"7a19458960a1058e",4424:"fd0c93a807a333e1",4559:"2e7ed39ea2757280",4854:"b64a1daa15899219",4866:"d1060b4faf2ae1e2",4970:"8a63b4953b0e4946",5020:"9ac8d0dc8390bb6e",5137:"f163e94c74a94d01",5165:"2681017cd0bd291f",5242:"7b643c6b3394cac1",5361:"afc00ab2626bacbf",5521:"cfdf2cfc6db31407",5526:"ff46471041fdcb79",5658:"600b820420422057",5681:"dd0e66b0de16e54b",6121:"eb9023b1cbc78ee2",6161:"4836cd7d031026bf",6195:"8710aa41b2319dff",6202:"f4317cf0a48876f9",6294:"24f510c0c3e3714c",6654:"41440ef667144967",6794:"57bf1aff78682f3a",7256:"e07cf52d87d40252",7268:"2f59c671f26160f3",7330:"7964f816a1ca64e5",7331:"2add3c4e125a2dba",7543:"89f7b805ed0f2901",8114:"8a8fdee4c3b7fd4b",8133:"b2ae90f43319a29e",8200:"a36b9f8c983c6b9e",8673:"8f38e67890334c5a",8747:"ae439f2382f58c51",8863:"fa0320ea586efb3b",8885:"d9308c756376780b",8901:"e117d206a917bda0",8924:"476aa688a637649c",9365:"a3e0e5ac101ccd02",9425:"244c8a7c1c14966a",9522:"c7c6e9c330f9ba6b",9614:"3221013d7f0af27f",9698:"4d09a99b9d99f3e5",9705:"40a82b97f214e28b",9754:"d67dec946fc871d4",9764:"2669775c6e107a01",9793:"4567af813117ad25",9974:"9a0f79beca65e8c4",9981:"678c7bcc42f24571"})[e]+".js",l.miniCssF=e=>"static/css/2f46e0db0d4a3aed.css",l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c={},l.l=(e,t,a,r)=>{if(c[e])return void c[e].push(t);if(void 0!==a)for(var d,f,o=document.getElementsByTagName("script"),n=0;n<o.length;n++){var b=o[n];if(b.getAttribute("src")==e||b.getAttribute("data-webpack")=="_N_E:"+a){d=b;break}}d||(f=!0,(d=document.createElement("script")).charset="utf-8",d.timeout=120,l.nc&&d.setAttribute("nonce",l.nc),d.setAttribute("data-webpack","_N_E:"+a),d.src=l.tu(e)),c[e]=[t];var i=(t,a)=>{d.onerror=d.onload=null,clearTimeout(s);var r=c[e];if(delete c[e],d.parentNode&&d.parentNode.removeChild(d),r&&r.forEach(e=>e(a)),t)return t(a)},s=setTimeout(i.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=i.bind(null,d.onerror),d.onload=i.bind(null,d.onload),f&&document.head.appendChild(d)},l.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.tt=()=>(void 0===r&&(r={createScriptURL:e=>e},"u">typeof trustedTypes&&trustedTypes.createPolicy&&(r=trustedTypes.createPolicy("nextjs#bundler",r))),r),l.tu=e=>l.tt().createScriptURL(e),l.p="/_next/",d={8068:0},l.f.miniCss=(e,t)=>{if(d[e])t.push(d[e]);else 0!==d[e]&&({5846:1})[e]&&t.push(d[e]=new Promise((t,a)=>{var c=l.miniCssF(e),r=l.p+c;if(((e,t)=>{for(var a=document.getElementsByTagName("link"),c=0;c<a.length;c++){var r=a[c],d=r.getAttribute("data-href")||r.getAttribute("href");if("stylesheet"===r.rel&&(d===e||d===t))return r}for(var f=document.getElementsByTagName("style"),c=0;c<f.length;c++){var r=f[c],d=r.getAttribute("data-href");if(d===e||d===t)return r}})(c,r))return t();((e,t,a,c)=>{var r=document.createElement("link");r.rel="stylesheet",r.type="text/css",r.onerror=r.onload=d=>{if(r.onerror=r.onload=null,"load"===d.type)a();else{var f=d&&("load"===d.type?"missing":d.type),o=d&&d.target&&d.target.href||t,n=Error("Loading CSS chunk "+e+" failed.\n("+o+")");n.code="CSS_CHUNK_LOAD_FAILED",n.type=f,n.request=o,r.parentNode.removeChild(r),c(n)}},r.href=t;if("function"==typeof _N_E_STYLE_LOAD){var d=r.href,f=r.onload,o=r.onerror;_N_E_STYLE_LOAD(0===d.indexOf(window.location.origin)?new URL(d).pathname:d).then(function(){f&&f.call(r,{type:"load"})},function(){o&&o.call(r,{})})}else document.head.appendChild(r)})(e,r,t,a)}).then(()=>{d[e]=0},t=>{throw delete d[e],t}))},f={8068:0,2859:0,2160:0,9894:0},l.f.j=(e,t)=>{var a=l.o(f,e)?f[e]:void 0;if(0!==a)if(a)t.push(a[2]);else if(/^(2160|2859|5846|8068|9894)$/.test(e))f[e]=0;else{var c=new Promise((t,c)=>a=f[e]=[t,c]);t.push(a[2]=c);var r=l.p+l.u(e),d=Error();l.l(r,t=>{if(l.o(f,e)&&(0!==(a=f[e])&&(f[e]=void 0),a)){var c=t&&("load"===t.type?"missing":t.type),r=t&&t.target&&t.target.src;d.message="Loading chunk "+e+" failed.\n("+c+": "+r+")",d.name="ChunkLoadError",d.type=c,d.request=r,a[1](d)}},"chunk-"+e,e)}},l.O.j=e=>0===f[e],o=(e,t)=>{var a,c,[r,d,o]=t,n=0;if(r.some(e=>0!==f[e])){for(a in d)l.o(d,a)&&(l.m[a]=d[a]);if(o)var b=o(l)}for(e&&e(t);n<r.length;n++)c=r[n],l.o(f,c)&&f[c]&&f[c][0](),f[c]=0;return l.O(b)},(n=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(o.bind(null,0)),n.push=o.bind(null,n.push.bind(n)),l.nc=void 0})();
1
+ (()=>{"use strict";var e,t,a,c,r,d,f,o,n,b={},i={};function l(e){var t=i[e];if(void 0!==t)return t.exports;var a=i[e]={exports:{}},c=!0;try{b[e].call(a.exports,a,a.exports,l),c=!1}finally{c&&delete i[e]}return a.exports}l.m=b,e=[],l.O=(t,a,c,r)=>{if(a){r=r||0;for(var d=e.length;d>0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[a,c,r];return}for(var f=1/0,d=0;d<e.length;d++){for(var[a,c,r]=e[d],o=!0,n=0;n<a.length;n++)(!1&r||f>=r)&&Object.keys(l.O).every(e=>l.O[e](a[n]))?a.splice(n--,1):(o=!1,r<f&&(f=r));if(o){e.splice(d--,1);var b=c();void 0!==b&&(t=b)}}return t},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},a=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,l.t=function(e,c){if(1&c&&(e=this(e)),8&c||"object"==typeof e&&e&&(4&c&&e.__esModule||16&c&&"function"==typeof e.then))return e;var r=Object.create(null);l.r(r);var d={};t=t||[null,a({}),a([]),a(a)];for(var f=2&c&&e;"object"==typeof f&&!~t.indexOf(f);f=a(f))Object.getOwnPropertyNames(f).forEach(t=>d[t]=()=>e[t]);return d.default=()=>e,l.d(r,d),r},l.d=(e,t)=>{for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},l.f={},l.e=e=>Promise.all(Object.keys(l.f).reduce((t,a)=>(l.f[a](e,t),t),[])),l.u=e=>2584===e?"static/chunks/2584-20a03146e1e2db70.js":"static/chunks/"+(({988:"993e5495",1048:"db9d41be",3888:"e868780c",7330:"d3ac728e",8133:"1ba63609",8747:"90542734",8924:"da12927c",9425:"bf2ff291"})[e]||e)+"."+({103:"23142a67b02246a8",202:"10de6e38a49a6c80",268:"ec500965c1761e26",370:"8e8f3cf8eb0e29dd",394:"475e54c848486e3a",398:"ffa02af9062a3950",484:"c74eeb0fca9a9ddf",852:"60444b32fcbeb00c",869:"7152372b662e31af",918:"6a9bbe564e4a2d0f",934:"9006461bd0548660",973:"9efc01efd9d768a5",988:"598a97aa1337298f",1032:"d9a9179233599785",1048:"27ee8fcc7bf00d70",1063:"775c442bdbeef08b",1133:"0f37525b2b215f36",1327:"09252bb80616cc3a",1708:"c3a1896e4cc9f8d9",1781:"9072b4c9586df549",2081:"47b6e9391094055f",2181:"ba21239d3ac39f81",2201:"08d1cac24fc438ee",2258:"4defa30121ef44a5",2325:"23caf22075e51aa5",2356:"523277bb8c6bf72a",2414:"8b3662a85cd1b14e",2418:"b5d9e177e10a686e",2480:"cf27ca02e5b19761",2539:"c5a4f2fd8e421c70",2619:"9431a3f48da8eef4",2695:"b732ef1965253b3f",2703:"495a65ed14b2f094",2821:"934bcf60fbdc28c6",3251:"408c817adb161919",3308:"8e27b5c43a478f0d",3336:"a76f9485fe7cb762",3606:"ddd8065b4a3108bd",3716:"72bf4c9d7325debd",3888:"0440c4cbaec74878",3995:"eca0f5bef1fc3ae5",4004:"74b9bcf5478b1663",4202:"8440832386f023c7",4238:"6f102dcbcf2ae339",4405:"7a19458960a1058e",4424:"fd0c93a807a333e1",4559:"2e7ed39ea2757280",4854:"b64a1daa15899219",4866:"d1060b4faf2ae1e2",4970:"8a63b4953b0e4946",5020:"9ac8d0dc8390bb6e",5137:"f163e94c74a94d01",5165:"2681017cd0bd291f",5242:"7b643c6b3394cac1",5361:"afc00ab2626bacbf",5521:"cfdf2cfc6db31407",5526:"ff46471041fdcb79",5658:"600b820420422057",5681:"dd0e66b0de16e54b",6121:"eb9023b1cbc78ee2",6161:"4836cd7d031026bf",6195:"8710aa41b2319dff",6202:"f4317cf0a48876f9",6294:"24f510c0c3e3714c",6654:"41440ef667144967",6794:"57bf1aff78682f3a",7256:"e07cf52d87d40252",7268:"2f59c671f26160f3",7330:"7964f816a1ca64e5",7331:"2add3c4e125a2dba",7543:"89f7b805ed0f2901",8114:"8a8fdee4c3b7fd4b",8133:"b2ae90f43319a29e",8200:"a36b9f8c983c6b9e",8673:"8f38e67890334c5a",8747:"ae439f2382f58c51",8863:"fa0320ea586efb3b",8885:"d9308c756376780b",8901:"e117d206a917bda0",8924:"476aa688a637649c",9365:"a3e0e5ac101ccd02",9425:"244c8a7c1c14966a",9522:"c7c6e9c330f9ba6b",9614:"3221013d7f0af27f",9698:"4d09a99b9d99f3e5",9705:"40a82b97f214e28b",9754:"d67dec946fc871d4",9764:"2669775c6e107a01",9793:"4567af813117ad25",9974:"9a0f79beca65e8c4",9981:"678c7bcc42f24571"})[e]+".js",l.miniCssF=e=>"static/css/2f46e0db0d4a3aed.css",l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c={},l.l=(e,t,a,r)=>{if(c[e])return void c[e].push(t);if(void 0!==a)for(var d,f,o=document.getElementsByTagName("script"),n=0;n<o.length;n++){var b=o[n];if(b.getAttribute("src")==e||b.getAttribute("data-webpack")=="_N_E:"+a){d=b;break}}d||(f=!0,(d=document.createElement("script")).charset="utf-8",d.timeout=120,l.nc&&d.setAttribute("nonce",l.nc),d.setAttribute("data-webpack","_N_E:"+a),d.src=l.tu(e)),c[e]=[t];var i=(t,a)=>{d.onerror=d.onload=null,clearTimeout(s);var r=c[e];if(delete c[e],d.parentNode&&d.parentNode.removeChild(d),r&&r.forEach(e=>e(a)),t)return t(a)},s=setTimeout(i.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=i.bind(null,d.onerror),d.onload=i.bind(null,d.onload),f&&document.head.appendChild(d)},l.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.tt=()=>(void 0===r&&(r={createScriptURL:e=>e},"u">typeof trustedTypes&&trustedTypes.createPolicy&&(r=trustedTypes.createPolicy("nextjs#bundler",r))),r),l.tu=e=>l.tt().createScriptURL(e),l.p="/_next/",d={8068:0},l.f.miniCss=(e,t)=>{if(d[e])t.push(d[e]);else 0!==d[e]&&({5846:1})[e]&&t.push(d[e]=new Promise((t,a)=>{var c=l.miniCssF(e),r=l.p+c;if(((e,t)=>{for(var a=document.getElementsByTagName("link"),c=0;c<a.length;c++){var r=a[c],d=r.getAttribute("data-href")||r.getAttribute("href");if("stylesheet"===r.rel&&(d===e||d===t))return r}for(var f=document.getElementsByTagName("style"),c=0;c<f.length;c++){var r=f[c],d=r.getAttribute("data-href");if(d===e||d===t)return r}})(c,r))return t();((e,t,a,c)=>{var r=document.createElement("link");r.rel="stylesheet",r.type="text/css",r.onerror=r.onload=d=>{if(r.onerror=r.onload=null,"load"===d.type)a();else{var f=d&&("load"===d.type?"missing":d.type),o=d&&d.target&&d.target.href||t,n=Error("Loading CSS chunk "+e+" failed.\n("+o+")");n.code="CSS_CHUNK_LOAD_FAILED",n.type=f,n.request=o,r.parentNode.removeChild(r),c(n)}},r.href=t;if("function"==typeof _N_E_STYLE_LOAD){var d=r.href,f=r.onload,o=r.onerror;_N_E_STYLE_LOAD(0===d.indexOf(window.location.origin)?new URL(d).pathname:d).then(function(){f&&f.call(r,{type:"load"})},function(){o&&o.call(r,{})})}else document.head.appendChild(r)})(e,r,t,a)}).then(()=>{d[e]=0},t=>{throw delete d[e],t}))},f={8068:0,2859:0,2160:0,9894:0},l.f.j=(e,t)=>{var a=l.o(f,e)?f[e]:void 0;if(0!==a)if(a)t.push(a[2]);else if(/^(2160|2859|5846|8068|9894)$/.test(e))f[e]=0;else{var c=new Promise((t,c)=>a=f[e]=[t,c]);t.push(a[2]=c);var r=l.p+l.u(e),d=Error();l.l(r,t=>{if(l.o(f,e)&&(0!==(a=f[e])&&(f[e]=void 0),a)){var c=t&&("load"===t.type?"missing":t.type),r=t&&t.target&&t.target.src;d.message="Loading chunk "+e+" failed.\n("+c+": "+r+")",d.name="ChunkLoadError",d.type=c,d.request=r,a[1](d)}},"chunk-"+e,e)}},l.O.j=e=>0===f[e],o=(e,t)=>{var a,c,[r,d,o]=t,n=0;if(r.some(e=>0!==f[e])){for(a in d)l.o(d,a)&&(l.m[a]=d[a]);if(o)var b=o(l)}for(e&&e(t);n<r.length;n++)c=r[n],l.o(f,c)&&f[c]&&f[c][0](),f[c]=0;return l.O(b)},(n=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(o.bind(null,0)),n.push=o.bind(null,n.push.bind(n)),l.nc=void 0})();
package/README.ja.md CHANGED
@@ -27,16 +27,22 @@
27
27
  **インストールせずに実行:**
28
28
 
29
29
  ```bash
30
- npx @kahme247/ompweb@latest
30
+ npx @37chengshan/ompweb@latest
31
31
  ```
32
32
 
33
33
  **またはグローバルにインストール:**
34
34
 
35
35
  ```bash
36
- npm install -g @kahme247/ompweb
36
+ npm install -g @37chengshan/ompweb
37
37
  ompweb
38
38
  ```
39
39
 
40
+ > **ミラーリポジトリ(例: npmmirror)では新規公開パッケージの同期が遅れたり E404 になる場合があります。** 公式レジストリを明示してください:
41
+ >
42
+ > ```bash
43
+ > npm install -g @37chengshan/ompweb --registry=https://registry.npmjs.org
44
+ > ```
45
+
40
46
  続いて [http://127.0.0.1:30177](http://127.0.0.1:30177) を開きます。サーバーの準備が整うと、CLI はブラウザを自動的に開こうとします。ompweb はデフォルトで `127.0.0.1` で待ち受けます。
41
47
 
42
48
  **オプション:**
package/README.md CHANGED
@@ -19,63 +19,108 @@ Local web UI for the [oh-my-pi (omp) coding agent](https://github.com/can1357/oh
19
19
 
20
20
  ## 🌟 Enhancements & Optimizations over Upstream (相比上游仓库的优化与增强)
21
21
 
22
- This repository ([37chengshan/ompweb](https://github.com/37chengshan/ompweb)) is a feature-rich, hardened fork of [kahme247/ompweb](https://github.com/kahme247/ompweb). Based on actual code implementations, the following key features, architectural upgrades, and performance optimizations have been added:
22
+ This repository ([37chengshan/ompweb](https://github.com/37chengshan/ompweb)) is a feature-rich, hardened fork of [kahme247/ompweb](https://github.com/kahme247/ompweb). Verified directly against the codebase, the following key features, architectural upgrades, and performance optimizations have been implemented:
23
23
 
24
- ### 1. 🖥️ Interactive Web Terminal (内置交互式终端)
25
- - **Real PTY Shell Integration (`app/api/terminal/route.ts`, `components/EmbeddedTerminal.tsx`)**: Spawns true pseudo-terminals (`python3 -c "import pty; pty.spawn(...)"`) with ANSI color decoding, bidirectional SSE streaming, serialized inputs, and dynamic window resize (`cols`/`rows`).
26
- - **Dockable Bottom Panel**: Run Git commands, build scripts, tests, and CLI tools directly within ompweb without leaving the browser. Includes auto session reaping and bounded output ring buffers.
24
+ ### 1. 🖥️ Interactive Web PTY Terminal (内置交互式 Web 终端)
25
+ - **Real PTY Shell Allocation (`lib/terminal-session-manager.ts`, `components/TerminalPanel.tsx`, `app/api/terminal/*`)**: Spawns true pseudo-terminals (`python3 -c "import pty,sys; pty.spawn(...)" /bin/zsh -i` on macOS, `script -qfc` on Linux) supporting full ANSI 256/TrueColor color decoding, real interactive line editing, cursor navigation, and live zsh/bash echo.
26
+ - **Session Lifecycle & Resource Bounds**: Automatically reaps idle shell processes (30min TTL) and enforces an 8-session global cap to prevent lingering orphan processes.
27
+ - **Buffer Safety & Ordered Keystrokes**: History output buffer is bounded by total byte size (`MAX_HISTORY_BYTES = 1MB`) rather than line count. Keystrokes are serialized through a FIFO queue with a 5s AbortSignal timeout to eliminate out-of-order execution during rapid typing.
27
28
 
28
- ### 2. 📂 Native File Manager Integration & Workspace Ordering (文件管理与工作区排序)
29
- - **Always-Visible Reveal Action (`components/FileExplorer.tsx`, `app/api/files/open/route.ts`)**: Permanent "Reveal in Finder / Explorer / File Manager" quick-actions on workspace headers and file tree nodes (not hover-gated) with cross-platform support (macOS `open`, Windows `explorer.exe`, Linux `xdg-open`).
30
- - **Workspace Aliases & Custom Ordering (`lib/project-registry.ts`, `lib/project-ordering.ts`)**: Rename workspace display labels (aliases) and customize project sidebar ordering persistently without mutating repository paths on disk.
29
+ ### 2. 📂 Native File Manager Integration (系统文件管理器一键定位)
30
+ - **Always-Visible Reveal Action (`app/api/reveal/route.ts`, `components/FileExplorer.tsx`, `components/SessionSidebar.tsx`)**: Permanent "Reveal in Finder / Explorer / File Manager" quick-actions on workspace headers and file tree nodes (not hover-gated) with cross-platform support (macOS `open <dir>` / `open -R <file>`, Windows `explorer /select,`, Linux `xdg-open`).
31
+ - **Security & Timeout Protection**: Paths are strictly validated against `getAllowedFileRoots()` and execution is capped at 8 seconds (`timeout: 8000`) so desktop file manager hangs never freeze the browser.
31
32
 
32
33
  ### 3. 🎨 Visual Theme Studio & Motion Controls (主题工作室与动效偏好)
33
- - **Theme Studio (`components/ThemeStudio.tsx`, `hooks/useTheme.ts`)**: Live preview and customize paper/ember design tokens with WCAG AA contrast verification, instant light/dark/system cycling, and custom color accents.
34
- - **Motion Accessibility (`hooks/useMotionPrefs.ts`)**: OS `prefers-reduced-motion` integration that instantly disables heavy SVG SMIL animations and replaces smooth-scrolling with instant jumps for users sensitive to motion.
35
-
36
- ### 4. 🧭 Plan Mode Surface & History Traceability (计划看板与压缩前历史追溯)
37
- - **Interactive Plan Panel (`components/PlanPanel.tsx`, `lib/plan-reader.ts`)**: Live plan document rendering from `<session>/local/*-plan.md`, one-click plan execution, and a dedicated critique/feedback modal (`onRejectPlan`).
38
- - **Pre-Compaction History Browsing (`lib/session-reader.ts`)**: Toggle and inspect full pre-compaction message history without polluting the active agent context.
39
-
40
- ### 5. ⚡ Frontend Rendering & Viewport Safety (前端渲染极致优化)
41
- - **Streaming Markdown AST Bypass (`components/MarkdownBody.tsx`)**: Bypasses expensive math regex scans (`normalizeDisplayMath`) and dynamic KaTeX imports during streaming, compiling AST only once on message commit for a smooth 60fps experience.
42
- - **LRU Memory Caches (`lib/markdown.ts`, `lib/patch.ts`)**: 200-slot LRU cache for display math normalization and 20-slot LRU cache for unified diff parsing (`parseUnifiedPatch`).
43
- - **DOM Explosion Protection (`components/MessageView.tsx`)**: 800-row limit (`MAX_ROWS = 800`) on Git diff views and 100KB safety caps on thinking/tool outputs.
44
- - **Component Memoization (`components/PlanPanel.tsx`, `components/MessageView.tsx`)**: `React.memo` wrappers prevent cascading re-renders during active streaming.
45
-
46
- ### 6. 🛡️ Backend Node.js, RPC & File I/O Hardening (后端 RPC 内存安全加固)
47
- - **Git ProjectRoot Dedup & 5-minute Cache (`lib/worktree.ts`)**: `__piProjectPendingCache` coalesces concurrent `resolveProject` calls into a single Promise and caches results for 5 minutes.
48
- - **SSE Socket & Memory Leak Prevention (`app/api/agent/[id]/events/route.ts`, `lib/rpc-manager.ts`)**: Emits `session_destroyed` upon session termination to immediately close SSE streams and unregister listeners.
49
- - **Child Process Dispose Failsafe (`lib/omp/rpc-process.ts`)**: `Promise.race` timeout fallback prevents hanging promises on un-reaped processes; `crlfDelay: Infinity` standardizes NDJSON parsing.
50
- - **Context Payload Shrinking (`lib/session-reader.ts`, `lib/types.ts`)**: Completely strips deferred `thinking` fields from JSON payloads rather than sending empty strings.
34
+ - **Theme Studio (`components/ThemePicker.tsx`, `hooks/useTheme.ts`)**: 18+ fine-tuned preset themes (Classic Paper, Ember Dark, Nord, Oatmeal, Matcha, OLED True Black, Sepia, Dracula, Pine, Navy, plus 6 fluid animated flow themes: `aurora-flow`, `dawn-flow`, `cosmic-flow`, `ocean-flow`, `sakura-flow`, `bamboo-flow`) and a full custom color palette picker.
35
+ - **Typography & Motion Accessibility (`hooks/useTypography.ts`, `hooks/useMotionPrefs.ts`)**: Custom font families, font scale multipliers, and line-height controls. Fully integrates with OS `prefers-reduced-motion` to instantly disable heavy animations and replace smooth scrolls with instant jumps.
36
+
37
+ ### 4. 🧭 Plan Mode Kanban & History Traceability (计划执行看板与历史追溯)
38
+ - **Interactive Plan Panel (`components/PlanPanel.tsx`, `lib/plan-reader.ts`, `app/api/sessions/[id]/plan/route.ts`)**: Live plan document rendering from `<session>/local/*-plan.md` with safe 256KB UTF-8 chunk reading (`StringDecoder`) that prevents loading oversized files into Node memory.
39
+ - **Session Switch Safety**: Automatically resets `planInfo` on session navigation so failed plan fetches can never leak previous session plans.
40
+
41
+ ### 5. ⚡ Frontend Rendering Performance & Memory Safety (前端渲染极致优化)
42
+ - **Streaming Markdown AST Bypass (`components/MarkdownBody.tsx`)**: Skips heavy `normalizeDisplayMath` regex scans and dynamic KaTeX imports during active token streaming, compiling the full AST only once on message commit.
43
+ - **LRU Math Delimiter Normalizer (`lib/markdown.ts`)**: 200-slot LRU cache (`NORMALIZE_CACHE_MAX = 200`) for display math normalization ensures committed messages render in $O(1)$ without re-running regex passes.
44
+ - **Granular `MessageView` Memoization (`components/MessageView.tsx`)**: Custom comparator (`haveSameRelevantToolResults`) ensures incoming tool results only re-render the specific message holding that `toolCallId`, avoiding global re-renders of the entire message list.
45
+ - **Large Markdown Safety Collapse (`components/MessageView.tsx`)**: Messages exceeding 100,000 characters automatically collapse into a lightweight virtualized raw text view (`SafeMarkdownBody`) to prevent React AST DOM explosion.
46
+ - **LRU Unified Patch Cache (`lib/patch.ts`)**: 20-slot LRU cache for diff parsing avoids duplicate regex and line parsing on re-renders.
47
+ - **Adaptive TPS Polling Backoff (`hooks/useAgentSession.ts`)**: Dynamically backs off `tokensPerSecond` polling from 2s to 4s during model thinking or tool execution, snapping back to 2s immediately when tokens stream.
48
+
49
+ ### 6. 🛡️ Backend Concurrency, RPC & File I/O Hardening (后端并发与 RPC 内存安全)
50
+ - **Git Worktree In-Flight Promise Dedup (`lib/worktree.ts`)**: `__piProjectPendingCache` coalesces concurrent `resolveProject` calls for identical directories into a single Promise and caches results with a 5-minute TTL.
51
+ - **Session Loader Concurrency Cap & Cache (`lib/session-reader.ts`)**: `loadAllSessions` restricts concurrent Git processes with `CONCURRENCY = 6`. File parses are memoized with a 32-slot LRU cache (`loadSessionEntriesCached`) keyed on `(size, mtimeMs)`.
52
+ - **Task Tool Telemetry Truncation (`lib/session-reader.ts`)**: `keepTaskToolResultDetails` bounds long string fields to 240 characters and 50 rows, eliminating multi-megabyte JSON payload bloat in session histories.
53
+ - **Child Process Dispose Failsafe (`lib/omp/rpc-process.ts`)**: Failsafe race timer fallback in `RpcProcess.dispose()` prevents un-reaped processes from hanging server teardown.
54
+ - **Atomic MCP Configuration (`lib/omp/mcp-config.ts`)**: Temp file write-and-rename wrapped in `try...finally` to guarantee orphan `.tmp-*` files are cleaned up on error; adds user-level MCP configuration support (`~/.omp/agent/mcp.json`).
51
55
 
52
56
  ### 7. ⚙️ Redesigned MCP Manager & Built-in Agent MCP (MCP 管理器重构与 Agent MCP 集成)
53
- - **Dual-Mode Visual Form Editor (`components/McpConfig.tsx`)**: Form-based editing (Transport, Command, Args, URL, Enabled switch) + JSON mode with quick templates (`Python stdio`, `NPX stdio`, `Remote HTTP`) and project/global configuration support.
54
- - **Categorized Accordion & Filter (`components/McpConfig.tsx`)**: Accordion grouping with real-time search for multi-client discovered MCP servers.
55
- - **Built-in Agent MCP Integration (`vendor/agent-mcp/`)**: Vendored `agent-mcp` (v3.0.0) multi-agent orchestration tools with SQLite tuning (`PRAGMA temp_store=MEMORY`, autocommit mode) and lock-free SSE broadcaster queues.
57
+ - **Visual Form & Template Editor (`components/McpConfig.tsx`)**: Dual-mode editor (Visual Form / Raw JSON) with quick templates (`Python stdio`, `NPX stdio`, `Remote HTTP`, `Brave Search`, `PostgreSQL`, `GitHub`, `Fetch`, `Filesystem`) and workspace/user scope switching.
58
+ - **Categorized Multi-Source Accordion (`components/McpConfig.tsx`)**: Collapsible accordion grouping with real-time fuzzy search across 50+ auto-discovered MCP servers.
59
+ - **Built-in Agent MCP Multi-Agent Orchestrator (`vendor/agent-mcp/`, `.omp/agents/`)**: Native Python multi-agent coordination daemon supporting 11+ Agent CLIs (OMP, Claude, Codex, Copilot, OpenCode, Pi, Grok, Kimi, ZCode, etc.), SQLite WAL mode with memory temp storage (`PRAGMA temp_store=MEMORY`), exponential backoff in `wait_agent` polling (0.1s to 2.0s), and bundled specialized agent system prompts (`designer`, `librarian`, `reviewer`, `scout`, `security-reviewer`, `sonic`, `task`).
56
60
 
57
61
  ## Requirements
58
62
 
59
63
  - [omp](https://github.com/can1357/oh-my-pi) installed and on your `PATH` (or point `OMP_WEB_OMP_BIN` at the binary)
60
- - Node.js 22.19.0 (`nvm use`; `node --version`)
64
+ - Node.js >= 22.19.0 (`node --version`)
61
65
 
62
66
  ## Quick Start
63
67
 
64
68
  **Run without installing:**
65
69
 
66
70
  ```bash
67
- npx @kahme247/ompweb@latest
71
+ npx @37chengshan/ompweb@latest
68
72
  ```
69
73
 
70
74
  **Or install globally:**
71
75
 
72
76
  ```bash
73
- npm install -g @kahme247/ompweb
77
+ npm install -g @37chengshan/ompweb
74
78
  ompweb
75
79
  ```
76
80
 
81
+ > **Mirror registries (e.g. npmmirror) may lag or 404 for newly published packages.** If install fails with `E404`, point npm at the official registry:
82
+ >
83
+ > ```bash
84
+ > npm install -g @37chengshan/ompweb --registry=https://registry.npmjs.org
85
+ > ```
86
+ >
87
+ > For `npx` on macOS/Linux: `npm_config_registry=https://registry.npmjs.org npx @37chengshan/ompweb@latest`; on Windows PowerShell: `$env:npm_config_registry="https://registry.npmjs.org"; npx @37chengshan/ompweb@latest`.
88
+
77
89
  Then open [http://127.0.0.1:30177](http://127.0.0.1:30177). The CLI will try to open the browser automatically after the server is ready. ompweb listens on `127.0.0.1` by default.
78
90
 
91
+ ### 🚀 Quick Start from Source (clone & run locally)
92
+
93
+ Clone this repository and run it directly on your machine:
94
+
95
+ ```bash
96
+ # 1. Clone
97
+ git clone https://github.com/37chengshan/ompweb.git
98
+ cd ompweb
99
+
100
+ # 2. Install dependencies (Node.js >= 22.19 required, see .nvmrc)
101
+ npm install
102
+
103
+ # 3. Start the dev server
104
+ npm run dev
105
+ # → open http://127.0.0.1:30178
106
+ ```
107
+
108
+ Requirements:
109
+
110
+ - **Node.js ≥ 22.19** (`.nvmrc` pins 22.19.0; `nvm use` will pick it up).
111
+ - **omp (oh-my-pi) CLI** on `PATH` (or set `OMP_WEB_OMP_BIN`). Live agent
112
+ features and the built-in terminal need it; session browsing works without.
113
+ - **Native build toolchain** for the `node-pty` dependency during
114
+ `npm install` when no prebuilt binary matches your platform:
115
+ - Linux: `python3`, `make`, `g++` (`sudo apt install build-essential python3`)
116
+ - macOS: Xcode Command Line Tools (`xcode-select --install`)
117
+ - Windows: prebuilt binaries are shipped for arm64/x64 — no toolchain needed.
118
+ The terminal spawns `cmd.exe` on Windows (input echo works over pipes;
119
+ zsh-style PTY line editing is not available there).
120
+
121
+ Production-style check before publishing: `npm run release:check` (typecheck +
122
+ lint + tests + production build).
123
+
79
124
  **Options:**
80
125
 
81
126
  ```bash
@@ -117,9 +162,9 @@ Set `OMP_WEB_PASSWORD` (or pass `--password`) to protect the interface and every
117
162
  - **See session state clearly**: context usage, cost, tokens-per-second (reported by omp itself), compaction state and method (with before → after token counts on compaction cards), and system prompt details are visible from the top bar and transcript.
118
163
  - **Preview markdown faithfully**: YAML frontmatter renders in a summary card (title + key/value rows), math fences stay aligned inside lists, and CJK ranges like `5~7U` are no longer mangled (GFM now requires `~~` for strikethrough).
119
164
  - **Pick projects naturally on Windows**: a drive picker at the filesystem root and a case-folded, symlink-aware project identity keep the sidebar stable across drives and worktrees.
120
- - **Configure less from the terminal**: manage models, login/API keys, model tests, task agents, native OMP controls (advisor, approval, Bash policy, thinking, compaction, memory, auto-learn, retry/fallback), skills (search, install, update checks), plugins, and project MCP servers from the web UI.
121
- - **MCP management in Settings**: a dedicated MCP tab lists installed project servers with status (enabled / disabled / invalid), supports add/edit/rename/validate/remove, and surfaces configuration failures as corner toasts.
122
- - **Slash commands that travel**: `/goal`, `/plan`, `/review`, `/fix`, `/test`, `/explain`, `/simplify`, `/commit`, and `/advisor` expand into well-structured prompts; omp's own commands (skills, `/compact`, …) appear via `available_commands_update`.
165
+ - **Configure less from the terminal**: manage models, login/API keys, model tests, task agents, native OMP controls (advisor, approval, Bash policy, thinking, compaction, memory, auto-learn, retry/fallback), skills (search, install, update checks), plugins, and project/global MCP servers from the web UI.
166
+ - **MCP management in Settings**: a dedicated MCP tab lists installed project and global servers with status (enabled / disabled / invalid), supports add/edit/rename/validate/remove, and surfaces configuration failures as corner toasts.
167
+ - **Slash commands that travel**: `/goal`, `/plan`, `/terminal`, `/theme`, `/mcp`, `/review`, `/fix`, `/test`, `/explain`, `/simplify`, `/commit`, and `/advisor` expand into well-structured prompts; omp's own commands (skills, `/compact`, …) appear via `available_commands_update`.
123
168
  - **Keep OMP current**: check the installed runtime version, update it, and restart active sessions from Settings when needed.
124
169
  - **Stay informed**: opt into browser notifications when an agent finishes, play a completion sound, and check installed skills for updates.
125
170
  - **Jump anywhere with ⌘K**: a command palette (⌘K / Ctrl+K) for switching sessions, starting new ones, and toggling the theme.
@@ -131,7 +176,7 @@ Set `OMP_WEB_PASSWORD` (or pass `--password`) to protect the interface and every
131
176
  | --- | --- |
132
177
  | `PORT` | Server port (default `30177`; `-p/--port` wins) |
133
178
  | `OMP_WEB_HOSTNAME` | Bind hostname (default `127.0.0.1`; `-H/--hostname` wins) |
134
- | `OMP_WEB_PASSWORD` / `--password` | Password for the sign-in screen; `--password` works in every shell (PowerShell/CMD) without ` $env:` syntax |
179
+ | `OMP_WEB_PASSWORD` / `--password` | Password for the sign-in screen; `--password` works in every shell (PowerShell/CMD) without `$env:` syntax |
135
180
  | `OMP_WEB_NO_OPEN` | Set to `1`/`true` to skip auto-opening the browser |
136
181
  | `OMP_WEB_OMP_BIN` | Absolute path to the `omp` binary when it is not on `PATH` |
137
182
  | `PI_CODING_AGENT_DIR` | Point at another omp agent directory (default `~/.omp/agent`) |
@@ -146,7 +191,7 @@ ompweb is a Node-hosted Next.js app that drives your installed `omp` binary —
146
191
  - **Models and auth**: RPC commands against the omp child process with strict payload validation (unknown-shape guards, safe fallbacks); the Models panel edits `models.yml` in the omp agent directory, dropping blank placeholder rows and rejecting ambiguous `enabledModels` entries.
147
192
  - **Native settings**: the General/MCP settings panels read and write the allow-listed subset of `~/.omp/agent/config.yml` (or `config.yaml` fallback), preserving unrelated keys and comments. Changes apply to new and restarted sessions.
148
193
  - **Skills and plugins**: scans omp's skill directories (`~/.omp/agent/skills`, project `.omp/skills`, and compat dirs) and shells out to `omp plugin` for plugin management.
149
- - **MCP servers**: project servers are managed through OMP's native locations (`.omp/mcp.json`, then compatibility files) at the git top level, validated against the stdio/http/sse schema and written atomically.
194
+ - **MCP servers**: project and global servers are managed through OMP's native locations (`.omp/mcp.json`, `~/.omp/agent/mcp.json`), validated against the stdio/http/sse schema and written atomically.
150
195
  - **File access**: file browsing and preview are scoped to the selected project directory and working directories that appear in sessions; paths are canonicalized via a single `isWindowsAbsolutePath`/`samePath` helper and symlink escapes are rejected after `realpath` resolution. On Windows the directory picker offers a drive list at the root.
151
196
  - **Forks vs in-session branches**: Fork creates a new `.jsonl` file. "Edit from here" creates another branch inside the same session file.
152
197
 
@@ -162,10 +207,10 @@ The local dev server runs at [http://127.0.0.1:30178](http://127.0.0.1:30178).
162
207
  Common checks:
163
208
 
164
209
  ```bash
165
- npm run typecheck # type check
166
- npm run lint # ESLint (zero warnings enforced)
167
- npm test # run test suite
168
- npm run build # production build
210
+ npm run typecheck # TypeScript type check (tsc --noEmit)
211
+ npm run lint # ESLint
212
+ npm test # Run native Node.js test suite
213
+ npm run build # Production build
169
214
  ```
170
215
 
171
216
  Avoid running `next build` / `npm run build` during local development. It writes to `.next/` and can interfere with the dev server; leave builds for release work.
package/README.zh-CN.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ompweb
2
2
 
3
- [English](./README.md) | [日本語](./README.ja.md)
3
+ [English](./README.md) | [简体中文](./README.zh-CN.md) | [日本語](./README.ja.md)
4
4
 
5
5
  社区:[加入 OMPWEB Discord](https://discord.gg/evqgGzRfM5)
6
6
 
@@ -8,93 +8,134 @@
8
8
 
9
9
  ![ompweb — 演示](docs/demo.gif)
10
10
 
11
- <d## 🌟 相比上游仓库的优化与增强 (Optimizations & Enhancements)
11
+ <details>
12
+ <summary>界面截图 (浅色 / 深色)</summary>
12
13
 
13
- 本仓库([37chengshan/ompweb](https://github.com/37chengshan/ompweb))是基于 [kahme247/ompweb](https://github.com/kahme247/ompweb) 的功能增强与深度调优版本。基于实际代码实现,包含了以下关键特性新增、架构升级与性能优化:
14
+ ![ompweb — 浅色主题](docs/screenshot-light.png)
14
15
 
15
- ### 1. 🖥️ 内置交互式 Web 终端 (Interactive Web Terminal)
16
- - **真 PTY 伪终端支持 (`app/api/terminal/route.ts`, `components/EmbeddedTerminal.tsx`)**:利用 `python3 -c "import pty; pty.spawn(...)"` 生成原生 PTY,支持 ANSI 全彩高亮解析、双向 SSE 流式传输、有序输入序列化与终端窗口动态缩放(`cols`/`rows`)。
17
- - **底部可停靠面板**:直接在 Web 界面执行 Git 命令、调试脚本和运行测试,自带超时会话自动回收与环形缓冲区溢出保护。
16
+ ![ompweb 深色主题](docs/screenshot-dark.png)
18
17
 
19
- ### 2. 📂 系统原生文件管理器联动与工作区排序 (File Explorer & Workspace Alias)
20
- - **常驻「在文件管理器中显示」快捷键 (`components/FileExplorer.tsx`, `app/api/files/open/route.ts`)**:工作区卡片与文件树节点提供常驻快捷按钮(无需 hover 悬停),跨平台调用系统原生文件管理器(macOS `open`、Windows `explorer.exe`、Linux `xdg-open`)。
21
- - **工作区别名与自定义排序 (`lib/project-registry.ts`, `lib/project-ordering.ts`)**:支持为工作区设置显示别名(Alias)并在侧边栏持久化自定义排序,不破坏磁盘目录结构。
18
+ </details>
22
19
 
23
- ### 3. 🎨 视觉主题工作室与无障碍动效控制 (Theme Studio & Motion Controls)
24
- - **主题调色工作室 (`components/ThemeStudio.tsx`, `hooks/useTheme.ts`)**:支持自定义纸感/余烬设计系统 Token,所有色彩均通过 WCAG AA 对比度验证,提供浅色/深色/跟随系统一键轮转与个性化强调色调节。
25
- - **动效无障碍支持 (`hooks/useMotionPrefs.ts`)**:自动适配系统 `prefers-reduced-motion` 偏好,立即禁用耗性能的 SVG SMIL 动效并将平滑滚动转换为瞬时跳跃,保障低配设备流畅度。
20
+ ## 🌟 相比上游仓库的优化与增强 (Optimizations & Enhancements)
26
21
 
27
- ### 4. 🧭 计划模式看板与压缩前历史追溯 (Plan Mode & History Traceability)
28
- - **交互式计划看板 (`components/PlanPanel.tsx`, `lib/plan-reader.ts`)**:实时同步并渲染 `<session>/local/*-plan.md` 计划草稿,支持一键执行计划与弹窗提交结构化修改意见(`onRejectPlan`)。
29
- - **压缩前历史追溯 (`lib/session-reader.ts`)**:允许用户在顶栏展开浏览上下文压缩前的全部原始历史记录,不污染当前活跃上下文。
22
+ 本仓库([37chengshan/ompweb](https://github.com/37chengshan/ompweb))是基于 [kahme247/ompweb](https://github.com/kahme247/ompweb) 的功能增强与深度调优版本。基于代码库的真实实现,包含了以下关键特性新增、架构升级与性能优化:
30
23
 
31
- ### 5. 前端渲染引擎与视口安全防御 (UI & React Rendering)
32
- - **流式 Markdown 增量绕过 (`components/MarkdownBody.tsx`)**:Token 流式输出期间跳过全文公式正则扫描(`normalizeDisplayMath`)与 KaTeX 插件动态加载,仅在消息提交时执行一次 AST 构建,保持 60fps 丝滑渲染。
33
- - **内存级 LRU 缓存加速 (`lib/markdown.ts`, `lib/patch.ts`)**:公式标准化内置 200 条容量 LRU 缓存,Unified Diff 解析内置 20 条容量 LRU 缓存(`patchCache`),消除重复计算。
34
- - **DOM 防雪崩与极端输出截断保护 (`components/MessageView.tsx`)**:Git Diff 视图设置 800 行硬上限(`MAX_ROWS = 800`),超长思考与 ToolResult 设置 100KB 防崩保护。
35
- - **组件细粒度 Memo 包装 (`components/PlanPanel.tsx`, `components/MessageView.tsx`)**:`React.memo` 阻断非必要级联重渲染。
24
+ ### 1. 🖥️ 内置交互式 Web PTY 终端 (Interactive Web PTY Terminal)
25
+ - **真 PTY 伪终端分配 (`lib/terminal-session-manager.ts`, `components/TerminalPanel.tsx`, `app/api/terminal/*`)**:在 macOS 上采用 `python3 -c "import pty,sys; pty.spawn(...)" /bin/zsh -i`,在 Linux 上采用 `script -qfc` 分配原生 PTY 伪设备,支持完整的 ANSI 256/TrueColor 高亮解析、交互式行编辑、光标移动及实时 zsh/bash 回显。
26
+ - **生命周期自动回收与实例上限**:无活动 30 分钟(30min TTL)自动回收销毁后台 shell 进程,全局限制最多 8 个并发终端会话,防止孤儿进程累积。
27
+ - **内存安全与按键防乱序**:历史输出缓冲区采用字节容量硬上限(`MAX_HISTORY_BYTES = 1MB`)而非单纯限制行数;前端按键输入引入串行化队列与 5 秒超时中止信号(AbortSignal),彻底解决高速连击下的按键乱序问题。
36
28
 
37
- ### 6. 🛡️ 后端 Node.js、RPC 进程与文件 I/O 加固 (Backend & Process Safety)
38
- - **Git 根目录内存持久缓存 + 并发去重 (`lib/worktree.ts`)**:延长 `PROJECT_CACHE_TTL_MS` 5 分钟,加入 `__piProjectPendingCache` 全局 Map 合并并行 Promise,杜绝重复 `git rev-parse` 进程风暴。
39
- - **SSE 僵尸连接彻底清理 (`app/api/agent/[id]/events/route.ts`, `lib/rpc-manager.ts`)**:会话终结或销毁时主动派发 `session_destroyed` 事件并安全关闭 `ReadableStream`,杜绝文件描述符与内存泄漏。
40
- - **子进程 Dispose 熔断保护 (`lib/omp/rpc-process.ts`)**:`RpcProcess.dispose()` 加入 `Promise.race` 熔断锁防止僵死进程挂起,`crlfDelay: Infinity` 标准化流式行解析。
41
- - **`deferThinking` 载荷瘦身 (`lib/session-reader.ts`, `lib/types.ts`)**:在延迟加载模式下直接从 JSON 结构中解构移除 thinking 字段,显著降低网络传输体积。
29
+ ### 2. 📂 系统原生文件管理器一键定位 (System File Manager Reveal)
30
+ - **常驻「在文件管理器中显示」快捷键 (`app/api/reveal/route.ts`, `components/FileExplorer.tsx`, `components/SessionSidebar.tsx`)**:工作区卡片与文件树节点提供常驻快捷按钮(无需 hover 悬停),跨平台调用系统原生文件管理器(macOS 区分目录 `open <dir>` 与文件 `open -R <file>`,Windows `explorer /select,`,Linux `xdg-open`)。
31
+ - **安全白名单与防挂起熔断**:路径受 `getAllowedFileRoots()` 严格校验防止越权逃逸,执行调用附加 8 秒超时熔断(`timeout: 8000`),避免桌面管理器卡死导致请求阻塞。
42
32
 
43
- ### 7. ⚙️ MCP 管理器体验重构与内置 Agent MCP
44
- - **双模式可视化表单编辑器 (`components/McpConfig.tsx`)**:提供「可视化表单(协议、命令/URL、参数、启用开关)」与「JSON 代码」双模式,内置 `Python stdio`、`NPX stdio`、`Remote HTTP` 一键模板,支持项目与全局(`~/.omp/agent/mcp.json`)配置自由切换。
45
- - **多源分类折叠手风琴 (`components/McpConfig.tsx`)**:对跨客户端自动发现的 50+ 个服务端按来源折叠并支持实时搜索。
46
- - **内置 Agent MCP 预设与微调 (`vendor/agent-mcp/`)**:自带多 Agent 编排工具库,配合 SQLite 高并发优化(`PRAGMA temp_store=MEMORY`、autocommit 事务无锁化)、SSE 广播队列无锁化原子置换与指数退避等待算法。
33
+ ### 3. 🎨 视觉主题工作室与排版动效定制 (Theme Studio & Motion Controls)
34
+ - **多达 18+ 预设主题 (`components/ThemePicker.tsx`, `hooks/useTheme.ts`)**:提供经典纸墨、余烬暗黑、Nord、Oatmeal、Matcha、OLED 纯黑、Sepia、Dracula、Pine、Navy 以及 6 种流体动态流动渐变主题(`aurora-flow`、`dawn-flow`、`cosmic-flow`、`ocean-flow`、`sakura-flow`、`bamboo-flow`),并支持完全自定义色彩取色。
35
+ - **排版定制与动效无障碍 (`hooks/useTypography.ts`, `hooks/useMotionPrefs.ts`)**:支持自定义字体族、字号缩放比例和行高;自动联动操作系统 `prefers-reduced-motion` 偏好,即时禁用耗性能的 SVG SMIL 动效并将平滑滚动转为瞬时跳转。
47
36
 
48
- ## 环境要求�会话终结或销毁时主动派发 `session_destroyed` 事件,SSE 流监听到后立即关闭 `ReadableStream` 并注销监听器,杜绝文件描述符与内存泄漏。
49
- - **子进程 Dispose 熔断保护 (`lib/omp/rpc-process.ts`)**:在 `RpcProcess.dispose()` 中加入 `Promise.race` 熔断定时器,即使操作系统偶发未能回收僵死进程,也能安全 resolve,防止 Promise 永久挂起;以 `crlfDelay: Infinity` 标准化流式行解析。
50
- - **原子文件操作异常清理 (`lib/omp/mcp-config.ts`)**:在原子写入中使用 `try ... finally { try { unlinkSync(temp); } catch {} }`,防止异常时残留 `.tmp-*` 孤儿文件。
51
- - **`deferThinking` 载荷瘦身 (`lib/session-reader.ts`, `lib/types.ts`)**:将 `ThinkingContent.thinking` 改为可选字段,在延迟加载模式下直接从 JSON 结构中解构移除该 key 而非返回空字符串,显著降低会话上下文网络传输开销。
37
+ ### 4. 🧭 计划模式看板与历史追溯 (Plan Mode Kanban & History)
38
+ - **交互式计划看板 (`components/PlanPanel.tsx`, `lib/plan-reader.ts`, `app/api/sessions/[id]/plan/route.ts`)**:实时同步并渲染 `<session>/local/*-plan.md` 计划成果,采用 `StringDecoder` 对前 256KB 实行字符安全边界切片读取,避免在 Node 内存中加载巨型文件。
39
+ - **会话切换状态隔离**:切换会话时自动重置 `planInfo`,杜绝跨会话计划数据残留。
52
40
 
53
- ### 3. ⚙️ MCP 管理器重构与内置 Agent MCP
54
- - **双模式可视化表单编辑器 (`components/McpConfig.tsx`)**:提供「可视化表单(协议、命令/URL、参数、启用开关)」与「JSON 代码」双模式,内置 `Python stdio`、`NPX stdio`、`Remote HTTP` 一键模板,并支持在项目与全局配置(`~/.omp/agent/mcp.json`)之间无缝切换。
55
- - **多源分类折叠手风琴 (`components/McpConfig.tsx`)**:对跨客户端自动发现的 50+ 个服务端按来源折叠并支持实时搜索,彻底解决卡片溢出和遮挡问题。
56
- - **内置 Agent MCP 编排引擎**:内嵌 `agent-mcp` (v3.0.0) 预设与工具,配合 SQLite 高并发优化(`PRAGMA temp_store=MEMORY`、`isolation_level=None` autocommit 事务无锁化)、SSE 广播队列无锁化原子引用置换与指数退避等待算法。
41
+ ### 5. 前端渲染性能极致调优 (UI & Rendering Performance)
42
+ - **流式 Markdown 增量旁路 (`components/MarkdownBody.tsx`)**:Token 流式输出期间跳过全文公式正则扫描(`normalizeDisplayMath`)与 KaTeX 插件动态加载,待消息提交后一次性解析,保持 60fps 丝滑输出。
43
+ - **数学公式正规化 LRU 缓存 (`lib/markdown.ts`)**:为 `normalizeDisplayMath` 引入 200 容量 LRU 缓存,已提交历史消息在切换主题或滚动时 $O(1)$ 命中,消除重复正则扫描。
44
+ - **细粒度 `MessageView` Memo 比对 (`components/MessageView.tsx`)**:通过 `haveSameRelevantToolResults` 仅在消息内部包含的 `toolCallId` 发生变动时触发单条消息重渲染,避免 Agent 执行工具时触发全局重渲染。
45
+ - **超大消息渲染熔断保护 (`components/MessageView.tsx`)**:超过 100,000 字符的巨型输出自动折叠为轻量虚拟化纯文本视图(`SafeMarkdownBody`),杜绝 React AST 解析导致的主线程崩溃。
46
+ - **Unified Diff LRU 缓存 (`lib/patch.ts`)**:Diff 解析内置 20 容量 LRU 缓存,避免重复行计算。
47
+ - **自适应 TPS 采样退避算法 (`hooks/useAgentSession.ts`)**:在模型处于深度思考或耗时工具调用时,自动将 `tokensPerSecond` 轮询间隔从 2 秒退避至 4 秒,Token 恢复输出时即刻回弹至 2 秒,显著减轻服务端压力。
57
48
 
58
- ## 环境要求
49
+ ### 6. 🛡️ 后端并发与 RPC 内存安全加固 (Backend & RPC Hardening)
50
+ - **Git Worktree 飞行中 Promise 聚合去重 (`lib/worktree.ts`)**:通过 `__piProjectPendingCache` 将并发发生的同一目录 `resolveProject` 请求合并为一个真实 Git 进程,并享有 5 分钟 TTL 缓存。
51
+ - **会话列表加载并发限制与 LRU 缓存 (`lib/session-reader.ts`)**:`loadAllSessions` 使用 `CONCURRENCY = 6` 批处理并发限制;`loadSessionEntriesCached` 提供 32 容量的 `(size, mtimeMs)` 校验缓存。
52
+ - **Task 工具遥测数据裁剪 (`lib/session-reader.ts`)**:`keepTaskToolResultDetails` 将日志文本截断至 240 字符并最多保留 50 行,彻底解决历史会话 JSON 传输膨胀导致的 Node 堆内存溢出。
53
+ - **RPC 子进程销毁防假死超时熔断 (`lib/omp/rpc-process.ts`)**:在 `RpcProcess.dispose()` 中新增 `failsafe` 超时竞争,防止操作系统僵死进程挂起销毁流程。
54
+ - **原子 MCP 配置文件操作 (`lib/omp/mcp-config.ts`)**:临时文件写入流程附带 `try...finally` 垃圾清理,支持全局用户配置(`~/.omp/agent/mcp.json`)。
59
55
 
60
- - 已安装 [omp](https://github.com/can1357/oh-my-pi) 且在 `PATH` 中(或通过 `OMP_WEB_OMP_BIN` 指向其二进制文件)
61
- - Node.js 22.19.0 或更高版本(`node --version`)
56
+ ### 7. ⚙️ MCP 管理器重构与内置 Agent MCP
57
+ - **双模式可视化表单编辑器 (`components/McpConfig.ts- **减少对终端配置的依赖**:在 Web UI 中管理模型、登录/API 密钥、模型测试、任务智能体、原生 OMP 控制(顾问、审批、Bash 策略、思考、压缩、记忆、自动学习、重试/回退)、技能(搜索、安装、更新检查)、插件以及项目/全局 MCP 服务器。
58
+ - **在设置中管理 MCP**:专用 MCP 标签页显示项目与全局服务器状态(已启用 / 已禁用 / 无效),支持添加、编辑、重命名、校验和删除,并通过角落提示显示配置失败。
59
+ - **丰富的斜杠命令**:`/goal`, `/plan`, `/terminal`, `/theme`, `/mcp`, `/review`, `/fix`, `/test`, `/explain`, `/simplify`, `/commit`, `/advisor` 扩展为结构化 Prompt;omp 自身的命令(技能、`/compact` 等)通过 `available_commands_update` 自动同步。
60
+ - **保持 OMP 为最新版本**:可在设置中检查已安装运行时、更新它,并按需重启活动会话。
61
+ - **及时获知完成状态**:可选择在智能体完成时接收浏览器通知,播放完成音效,并检查已安装技能的更新。
62
+ - **⌘K 随处跳转**:命令面板(⌘K / Ctrl+K)支持切换会话、新建会话和切换主题。
63
+ - **温暖的纸感设计**:18+ 款浅色/深色主题,衬线展示字体,对比度经 WCAG AA 验证,基于 Base UI 基元、cmdk 与 lucide 图标构建。
62
64
 
63
- ## 快速开始
65
+ ## 配置
64
66
 
65
- **免安装直接运行:**
67
+ | 变量 | 含义 |
68
+ | --- | --- |
69
+ | `PORT` | 服务器端口(默认 `30177`;`-p/--port` 优先) |
70
+ | `OMP_WEB_HOSTNAME` | 绑定主机名(默认 `127.0.0.1`;`-H/--hostname` 优先) |
71
+ | `OMP_WEB_PASSWORD` / `--password` | 登录页面使用的密码;`--password` 适用于所有终端环境 |
72
+ | `OMP_WEB_NO_OPEN` | 设为 `1`/`true` 可跳过自动打开浏览器 |
73
+ | `OMP_WEB_OMP_BIN` | `omp` 不在 `PATH` 中时,指向其二进制文件的绝对路径 |
74
+ | `PI_CODING_AGENT_DIR` | 指向其他 omp agent 目录(默认 `~/.omp/agent`) |
75
+ | `HTTP_PROXY` / `HTTPS_PROXY` / `NO_PROXY` | 服务器端请求使用的标准代理变量 |
66
76
 
67
- ```bash
68
- npx @kahme247/ompweb@latest
69
- ```
77
+ ## 架构
70
78
 
71
- **或全局安装:**
79
+ ompweb 是一个由 Node 托管的 Next.js 应用,驱动你已安装的 `omp` 二进制文件——它并不内嵌智能体:
80
+
81
+ - **实时会话**:启动 `omp --mode rpc-ui`(基于 stdio 的 NDJSON),每个活动会话对应一个子进程,因此智能体版本始终与你安装的完全一致。
82
+ - **会话浏览**:直接读取 omp 的会话文件(`~/.omp/agent/sessions/<encoded-cwd>/<timestamp>_<uuid>.jsonl`);标题、归档和删除是受保护的原生文件维护操作,不会与 OMP 的实时写入竞争。
83
+ - **模型与认证**:通过 RPC 命令与 omp 子进程交互;模型面板编辑 omp agent 目录中的 `models.yml`。
84
+ - **技能与插件**:扫描 omp 的技能目录(`~/.omp/agent/skills`、项目内 `.omp/skills` 及兼容目录),并调用 `omp plugin` 进行插件管理。
85
+ - **MCP 服务器**:通过 OMP 原生位置(`.omp/mcp.json`、`~/.omp/agent/mcp.json`)管理项目与全局服务器,严格校验协议并原子写入。
86
+ - **文件访问**:文件浏览与预览仅限于所选项目目录以及会话中出现过的工作目录。
87
+ - **分叉与会话内分支**:分叉会创建新的 `.jsonl` 文件;“从此处编辑”则在同一会话文件内创建另一个分支。
88
+
89
+ ## 开发
72
90
 
73
91
  ```bash
74
- npm install -g @kahme247/ompweb
75
- ompweb
92
+ npm install
93
+ npm run dev
76
94
  ```
77
95
 
78
- 然后打开 [http://127.0.0.1:30177](http://127.0.0.1:30177)。服务器就绪后,CLI 会尝试自动打开浏览器。ompweb 默认监听 `127.0.0.1`。
96
+ 本地开发服务器运行在 [http://127.0.0.1:30178](http://127.0.0.1:30178)
79
97
 
80
- **选项:**
98
+ 常用检查:
81
99
 
82
100
  ```bash
83
- ompweb --port 8080 # 自定义端口
84
- ompweb --hostname 0.0.0.0 # 在可信网络中暴露服务
85
- ompweb -p 8080 -H 0.0.0.0 # 组合使用
86
- ompweb --no-open # 不自动打开浏览器
87
-
88
- ompweb --password "a-long-random-password" # 启用仅密码登录(Windows 同样适用)
89
-
90
- PORT=8080 ompweb # 也支持环境变量
91
- OMP_WEB_HOSTNAME=0.0.0.0 ompweb # 显式暴露到网络
92
- OMP_WEB_PASSWORD='a-long-random-password' ompweb # 环境变量形式(POSIX)
93
- # Windows: $env:OMP_WEB_PASSWORD="secret"; ompweb
94
- OMP_WEB_NO_OPEN=1 ompweb # 作为后台服务运行时很有用
101
+ npm run typecheck # TypeScript 类型检查 (tsc --noEmit)
102
+ npm run lint # ESLint(零警告)
103
+ npm test # 运行原生 Node.js 测试套件
104
+ npm run build # 生产构建
95
105
  ```
96
106
 
97
- 设置 `OMP_WEB_PASSWORD` 可通过与主题集成的仅密码登录页面保护界面和所有 API 端点。登录成功后,会创建有效期为 30 天的 HTTP-only 签名会话 Cookie;留空则关闭认证。远程访问仍需通过受信任反向代理或 VPN 提供 HTTPS,以保护密码和会话 Cookie。默认仅监听 `127.0.0.1`;不要将 ompweb 直接暴露到互联网。
107
+ 本地开发时请避免运行 `next build` / `npm run build`。它会写入 `.next/`,可能干扰开发服务器;构建请留到发布阶段。
108
+
109
+ ## 多语言支持
110
+
111
+ ompweb 支持英语、简体中文和日本語,三种语言均覆盖整个界面的翻译字符串。语言从 `navigator.language` 自动检测,可通过顶栏的语言菜单在运行时切换。选择会跨会话持久化。
112
+
113
+ - 字典文件:`lib/i18n/locales/{en,zh-CN,ja}.json`
114
+ - 框架:`lib/i18n/index.tsx` — 基于 `useSyncExternalStore` 的轻量 store,支持 `{var}` 插值和复数形式(`.one`/`.other`)
115
+ - API 错误消息通过稳定的错误码(`errors.<code>`)在客户端翻译
116
+
117
+ ## 质量
118
+
119
+ - **可访问性**:符合 WCAG AA 标准 — Lighthouse 可访问性评分 100/100,全键盘导航,焦点可见环,ARIA 角色
120
+ - **性能**:列表组件 memo 化、RAF 节流滚动/鼠标处理、防抖搜索、流式 JSONL 读取器、ETag 缓存会话列表
121
+ - **健壮性**:优雅关闭 omp 子进程(进程组杀死)、错误边界、原子化会话文件重写
122
+ - **测试**:聚焦的测试套件覆盖会话解析、终端输入、Markdown 渲染、消息展示、原生设置和 MCP 配置
123
+
124
+ ## 致谢
125
+
126
+ ompweb 分叉自 [agegr/pi-web](https://github.com/agegr/pi-web)(MIT)——[earendil/pi-mono](https://github.com/earendil-works/pi) pi 编程智能体的 Web UI,并针对 [can1357/oh-my-pi](https://github.com/can1357/oh-my-pi) 进行了适配。
127
+
128
+ ## 许可证
129
+
130
+ MIT��过受信任反向代理或 VPN 提供 HTTPS,以保护密码和会话 Cookie。默认仅监听 `127.0.0.1`;不要将 ompweb 直接暴露到互联网。
131
+
132
+ ### 安全与故障排查
133
+
134
+ - 服务器默认仅绑定 `127.0.0.1`。非环回地址属于显式选择,仅可在可信网络边界内使用;ompweb 不适合直接向公网暴露。
135
+ - 文件 API 严格限制在所选工作区、有效 Git 工作树、会话引用的目录以及显式选择的根目录。路径会经过规范化处理,杜绝路径穿越和符号链接逃逸。
136
+ - 优先从 `OMP_WEB_OMP_BIN` 解析 `omp`,其次从 `PATH` 解析。如果无法启动实时对话,请在相同终端运行 `omp --version` 或设置绝对路径。
137
+ - 会话历史保留原生的 OMP JSONL 格式。OMP 拥有实时会话的写入权;ompweb 直接读取文件,仅在不与实时写入冲突时执行显式标题、归档和删除操作。
138
+ - 会话归档采用 OMP 原生的 `archive/sessions/<cwd>/<file>.jsonl.gz` 布局,并将附属产物与记录一同移动;原始 JSONL 完整保存在 gzip 内。
98
139
 
99
140
  ## 功能特性
100
141
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@37chengshan/ompweb",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "Web UI for the oh-my-pi (omp) coding agent",
5
5
  "homepage": "https://github.com/kahme247/ompweb#readme",
6
6
  "repository": {