ompchamber 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +253 -0
- package/dist/client/apple-touch-icon.png +0 -0
- package/dist/client/icon-192x192.png +0 -0
- package/dist/client/icon-512x512.png +0 -0
- package/dist/client/icon-maskable-512x512.png +0 -0
- package/dist/client/icon.svg +60 -0
- package/dist/client/index.html +41 -0
- package/dist/client/manifest.webmanifest +38 -0
- package/dist/client/static/css/g.f36aa429fa.css +1 -0
- package/dist/client/static/css/index.a0f07455bd.css +2 -0
- package/dist/client/static/css/katex-vendor.ca3a0600e8.css +1 -0
- package/dist/client/static/font/KaTeX_AMS-Regular.1608a09b4a.woff +0 -0
- package/dist/client/static/font/KaTeX_AMS-Regular.4aafdb685c.ttf +0 -0
- package/dist/client/static/font/KaTeX_AMS-Regular.a79f1c3119.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Caligraphic-Bold.b67709187b.woff +0 -0
- package/dist/client/static/font/KaTeX_Caligraphic-Bold.cce5b8ecea.ttf +0 -0
- package/dist/client/static/font/KaTeX_Caligraphic-Bold.ec17d13264.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Caligraphic-Regular.07ef19e7b0.ttf +0 -0
- package/dist/client/static/font/KaTeX_Caligraphic-Regular.55fac25845.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Caligraphic-Regular.dad44a7fc6.woff +0 -0
- package/dist/client/static/font/KaTeX_Fraktur-Bold.9f256b8593.woff +0 -0
- package/dist/client/static/font/KaTeX_Fraktur-Bold.b18f59e1d1.ttf +0 -0
- package/dist/client/static/font/KaTeX_Fraktur-Bold.d42a5579b0.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Fraktur-Regular.7c1871215e.woff +0 -0
- package/dist/client/static/font/KaTeX_Fraktur-Regular.d3c882a649.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Fraktur-Regular.ed38e79f57.ttf +0 -0
- package/dist/client/static/font/KaTeX_Main-Bold.b74a1a8b2c.ttf +0 -0
- package/dist/client/static/font/KaTeX_Main-Bold.c3fb5ac22f.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Main-Bold.d181c4650d.woff +0 -0
- package/dist/client/static/font/KaTeX_Main-BoldItalic.6f2bb1dff2.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Main-BoldItalic.70d8b0a530.ttf +0 -0
- package/dist/client/static/font/KaTeX_Main-BoldItalic.e3f82f9d27.woff +0 -0
- package/dist/client/static/font/KaTeX_Main-Italic.47373d1e51.ttf +0 -0
- package/dist/client/static/font/KaTeX_Main-Italic.8916142bec.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Main-Italic.9024d815ba.woff +0 -0
- package/dist/client/static/font/KaTeX_Main-Regular.0462f03bdf.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Main-Regular.7f51fe0340.woff +0 -0
- package/dist/client/static/font/KaTeX_Main-Regular.b7f8fe9b5f.ttf +0 -0
- package/dist/client/static/font/KaTeX_Math-BoldItalic.572d331f69.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Math-BoldItalic.a879cf8383.ttf +0 -0
- package/dist/client/static/font/KaTeX_Math-BoldItalic.f1035d8d5d.woff +0 -0
- package/dist/client/static/font/KaTeX_Math-Italic.5295ba483a.woff +0 -0
- package/dist/client/static/font/KaTeX_Math-Italic.939bc64440.ttf +0 -0
- package/dist/client/static/font/KaTeX_Math-Italic.f28c23acad.woff2 +0 -0
- package/dist/client/static/font/KaTeX_SansSerif-Bold.8c5b5494b6.woff2 +0 -0
- package/dist/client/static/font/KaTeX_SansSerif-Bold.94e1e8dc5f.ttf +0 -0
- package/dist/client/static/font/KaTeX_SansSerif-Bold.bf59d231c3.woff +0 -0
- package/dist/client/static/font/KaTeX_SansSerif-Italic.3b1e59b3ba.woff2 +0 -0
- package/dist/client/static/font/KaTeX_SansSerif-Italic.7c9bc82b17.woff +0 -0
- package/dist/client/static/font/KaTeX_SansSerif-Italic.b4c20c84d8.ttf +0 -0
- package/dist/client/static/font/KaTeX_SansSerif-Regular.740484788f.woff +0 -0
- package/dist/client/static/font/KaTeX_SansSerif-Regular.ba21ed5f84.woff2 +0 -0
- package/dist/client/static/font/KaTeX_SansSerif-Regular.d4d7ba4804.ttf +0 -0
- package/dist/client/static/font/KaTeX_Script-Regular.03e9641d6f.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Script-Regular.0750571032.woff +0 -0
- package/dist/client/static/font/KaTeX_Script-Regular.fe9cbbe1a0.ttf +0 -0
- package/dist/client/static/font/KaTeX_Size1-Regular.e1e279cbdd.woff +0 -0
- package/dist/client/static/font/KaTeX_Size1-Regular.eae34984b3.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Size1-Regular.fabc004aab.ttf +0 -0
- package/dist/client/static/font/KaTeX_Size2-Regular.577270225e.woff +0 -0
- package/dist/client/static/font/KaTeX_Size2-Regular.5916a24fa3.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Size2-Regular.d6b476ecd3.ttf +0 -0
- package/dist/client/static/font/KaTeX_Size3-Regular.9acaf01c64.woff +0 -0
- package/dist/client/static/font/KaTeX_Size3-Regular.a144ef5840.ttf +0 -0
- package/dist/client/static/font/KaTeX_Size4-Regular.10d95fd3a2.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Size4-Regular.7a996c9da2.woff +0 -0
- package/dist/client/static/font/KaTeX_Size4-Regular.fbccdabe0a.ttf +0 -0
- package/dist/client/static/font/KaTeX_Typewriter-Regular.6258592bdc.woff +0 -0
- package/dist/client/static/font/KaTeX_Typewriter-Regular.a8709e3622.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Typewriter-Regular.d97aaf4a1e.ttf +0 -0
- package/dist/client/static/font/fira-code-cyrillic-400-normal.5971438a4a.woff2 +0 -0
- package/dist/client/static/font/fira-code-cyrillic-400-normal.9bb7bfea9c.woff +0 -0
- package/dist/client/static/font/fira-code-cyrillic-500-normal.5486265b18.woff2 +0 -0
- package/dist/client/static/font/fira-code-cyrillic-500-normal.89f92bfb31.woff +0 -0
- package/dist/client/static/font/fira-code-cyrillic-600-normal.2805b497e5.woff +0 -0
- package/dist/client/static/font/fira-code-cyrillic-600-normal.86e0df22a3.woff2 +0 -0
- package/dist/client/static/font/fira-code-cyrillic-700-normal.505a88f22a.woff +0 -0
- package/dist/client/static/font/fira-code-cyrillic-700-normal.76f5e8d2e2.woff2 +0 -0
- package/dist/client/static/font/fira-code-cyrillic-ext-400-normal.3c4b15e57d.woff2 +0 -0
- package/dist/client/static/font/fira-code-cyrillic-ext-400-normal.61323debaa.woff +0 -0
- package/dist/client/static/font/fira-code-cyrillic-ext-500-normal.0f34210f2a.woff2 +0 -0
- package/dist/client/static/font/fira-code-cyrillic-ext-500-normal.2497cfa1aa.woff +0 -0
- package/dist/client/static/font/fira-code-cyrillic-ext-600-normal.40fce94af9.woff2 +0 -0
- package/dist/client/static/font/fira-code-cyrillic-ext-600-normal.6c8774b829.woff +0 -0
- package/dist/client/static/font/fira-code-cyrillic-ext-700-normal.4b742eb865.woff +0 -0
- package/dist/client/static/font/fira-code-cyrillic-ext-700-normal.e75eb4fccc.woff2 +0 -0
- package/dist/client/static/font/fira-code-greek-400-normal.bb900468b6.woff2 +0 -0
- package/dist/client/static/font/fira-code-greek-400-normal.be76e699ba.woff +0 -0
- package/dist/client/static/font/fira-code-greek-500-normal.176c9fb001.woff2 +0 -0
- package/dist/client/static/font/fira-code-greek-500-normal.d2c596136b.woff +0 -0
- package/dist/client/static/font/fira-code-greek-600-normal.490c3deed7.woff +0 -0
- package/dist/client/static/font/fira-code-greek-600-normal.7df14376d9.woff2 +0 -0
- package/dist/client/static/font/fira-code-greek-700-normal.c82b6072fc.woff2 +0 -0
- package/dist/client/static/font/fira-code-greek-700-normal.d5f2b2917b.woff +0 -0
- package/dist/client/static/font/fira-code-greek-ext-400-normal.4849a79781.woff +0 -0
- package/dist/client/static/font/fira-code-greek-ext-400-normal.7f5bfc4538.woff2 +0 -0
- package/dist/client/static/font/fira-code-greek-ext-500-normal.aaccca4075.woff2 +0 -0
- package/dist/client/static/font/fira-code-greek-ext-500-normal.e383181256.woff +0 -0
- package/dist/client/static/font/fira-code-greek-ext-600-normal.78cb4bff8e.woff +0 -0
- package/dist/client/static/font/fira-code-greek-ext-600-normal.d6c93d54f9.woff2 +0 -0
- package/dist/client/static/font/fira-code-greek-ext-700-normal.57ec7c92d9.woff +0 -0
- package/dist/client/static/font/fira-code-greek-ext-700-normal.8fafdae5e8.woff2 +0 -0
- package/dist/client/static/font/fira-code-latin-400-normal.2655b10c55.woff2 +0 -0
- package/dist/client/static/font/fira-code-latin-400-normal.973295532b.woff +0 -0
- package/dist/client/static/font/fira-code-latin-500-normal.7ae2be8fb8.woff +0 -0
- package/dist/client/static/font/fira-code-latin-500-normal.92a991f204.woff2 +0 -0
- package/dist/client/static/font/fira-code-latin-600-normal.1dbbe5bc27.woff +0 -0
- package/dist/client/static/font/fira-code-latin-600-normal.43788eb7f1.woff2 +0 -0
- package/dist/client/static/font/fira-code-latin-700-normal.2667215d33.woff2 +0 -0
- package/dist/client/static/font/fira-code-latin-700-normal.497a70148b.woff +0 -0
- package/dist/client/static/font/fira-code-latin-ext-400-normal.9dfae29aaf.woff +0 -0
- package/dist/client/static/font/fira-code-latin-ext-400-normal.e534ae46e2.woff2 +0 -0
- package/dist/client/static/font/fira-code-latin-ext-500-normal.24c7b781b0.woff +0 -0
- package/dist/client/static/font/fira-code-latin-ext-500-normal.aad44ab072.woff2 +0 -0
- package/dist/client/static/font/fira-code-latin-ext-600-normal.7bed0f2f7e.woff +0 -0
- package/dist/client/static/font/fira-code-latin-ext-600-normal.c509a7c9f1.woff2 +0 -0
- package/dist/client/static/font/fira-code-latin-ext-700-normal.6c66c8b0a9.woff2 +0 -0
- package/dist/client/static/font/fira-code-latin-ext-700-normal.88f64e2822.woff +0 -0
- package/dist/client/static/font/fira-code-symbols2-400-normal.97d3f4b17c.woff +0 -0
- package/dist/client/static/font/fira-code-symbols2-500-normal.b06f1a06e4.woff +0 -0
- package/dist/client/static/font/fira-code-symbols2-600-normal.304b653b93.woff +0 -0
- package/dist/client/static/font/fira-code-symbols2-700-normal.d8ce0ad586.woff +0 -0
- package/dist/client/static/js/async/0.8e59f2eb5b.js +1 -0
- package/dist/client/static/js/async/0k.5852e6b4fa.js +1 -0
- package/dist/client/static/js/async/0w.9ed36d5860.js +1 -0
- package/dist/client/static/js/async/1.f387c12b63.js +1 -0
- package/dist/client/static/js/async/12.d091f91c99.js +1 -0
- package/dist/client/static/js/async/13.8f810a8a6c.js +1 -0
- package/dist/client/static/js/async/19.6fe909d55a.js +160 -0
- package/dist/client/static/js/async/1b.23f1141a38.js +1 -0
- package/dist/client/static/js/async/1k.544adbf77d.js +2 -0
- package/dist/client/static/js/async/1k.544adbf77d.js.LICENSE.txt +6 -0
- package/dist/client/static/js/async/1p.0d5cddda96.js +1 -0
- package/dist/client/static/js/async/2.b589f1733b.js +1 -0
- package/dist/client/static/js/async/2v.96165101de.js +1 -0
- package/dist/client/static/js/async/3.0cacc08423.js +1 -0
- package/dist/client/static/js/async/37.b28b2f61cd.js +1 -0
- package/dist/client/static/js/async/3d.5085fb913f.js +1 -0
- package/dist/client/static/js/async/3j.a2fcea99be.js +2 -0
- package/dist/client/static/js/async/3j.a2fcea99be.js.LICENSE.txt +11 -0
- package/dist/client/static/js/async/3p.bcf32a0983.js +1 -0
- package/dist/client/static/js/async/3r.3a69e98ee0.js +64 -0
- package/dist/client/static/js/async/3u.1228460e2a.js +1 -0
- package/dist/client/static/js/async/3y.22075aa079.js +198 -0
- package/dist/client/static/js/async/3y.22075aa079.js.LICENSE.txt +5 -0
- package/dist/client/static/js/async/4.9442eeb472.js +1 -0
- package/dist/client/static/js/async/4e.678285ca55.js +1 -0
- package/dist/client/static/js/async/4k.33a0c7eeb4.js +1 -0
- package/dist/client/static/js/async/4q.aad20dab25.js +1 -0
- package/dist/client/static/js/async/5.ebaf8b89cc.js +36 -0
- package/dist/client/static/js/async/51.1938cec320.js +2 -0
- package/dist/client/static/js/async/51.1938cec320.js.LICENSE.txt +6 -0
- package/dist/client/static/js/async/5b.d88304bc13.js +1 -0
- package/dist/client/static/js/async/5j.d6407c4248.js +287 -0
- package/dist/client/static/js/async/5o.88316d4460.js +62 -0
- package/dist/client/static/js/async/6.7929428505.js +1 -0
- package/dist/client/static/js/async/66.5dfa29f957.js +93 -0
- package/dist/client/static/js/async/69.a18a10882f.js +1 -0
- package/dist/client/static/js/async/6o.5b1a06a382.js +1 -0
- package/dist/client/static/js/async/7.e4a9288dd0.js +1 -0
- package/dist/client/static/js/async/73.50280ce58d.js +1 -0
- package/dist/client/static/js/async/7e.a1cc9bfd88.js +1 -0
- package/dist/client/static/js/async/7l.7a6a377ecc.js +1 -0
- package/dist/client/static/js/async/8.5067439d8c.js +1 -0
- package/dist/client/static/js/async/8j.ea110663fb.js +1 -0
- package/dist/client/static/js/async/a.bce4542392.js +1 -0
- package/dist/client/static/js/async/aa.65d3852576.js +1 -0
- package/dist/client/static/js/async/ar.9dc8b1992a.js +2 -0
- package/dist/client/static/js/async/ar.9dc8b1992a.js.LICENSE.txt +6 -0
- package/dist/client/static/js/async/az.d656062b0f.js +1 -0
- package/dist/client/static/js/async/b.b4f6f06515.js +1 -0
- package/dist/client/static/js/async/bi.cbfe8eaa8e.js +1 -0
- package/dist/client/static/js/async/bq.586bc738d1.js +1 -0
- package/dist/client/static/js/async/c.cd45b0ac45.js +1 -0
- package/dist/client/static/js/async/c0.0af1e640d3.js +24 -0
- package/dist/client/static/js/async/ca.8a52cfd447.js +1 -0
- package/dist/client/static/js/async/cf.d34fff5d67.js +1 -0
- package/dist/client/static/js/async/ct.38d9da8a5a.js +1 -0
- package/dist/client/static/js/async/cx.ca5feec570.js +226 -0
- package/dist/client/static/js/async/d.a5fc8fe1b3.js +1 -0
- package/dist/client/static/js/async/da.f62c70f6c8.js +1 -0
- package/dist/client/static/js/async/dp.1725d6432c.js +1 -0
- package/dist/client/static/js/async/e.93214d622b.js +79 -0
- package/dist/client/static/js/async/f.ab50467719.js +19 -0
- package/dist/client/static/js/async/f.ab50467719.js.LICENSE.txt +12 -0
- package/dist/client/static/js/async/f8.bbf0dbae70.js +1 -0
- package/dist/client/static/js/async/fw.fb1a08b92d.js +6 -0
- package/dist/client/static/js/async/fw.fb1a08b92d.js.LICENSE.txt +6 -0
- package/dist/client/static/js/async/h.4e790471e4.js +27 -0
- package/dist/client/static/js/async/h1.e8d5aa8e80.js +1 -0
- package/dist/client/static/js/async/h3.216e9798ab.js +148 -0
- package/dist/client/static/js/async/hd.0da931b622.js +1 -0
- package/dist/client/static/js/async/hk.ba7fb04d41.js +1 -0
- package/dist/client/static/js/async/hn.7568bdb58b.js +1 -0
- package/dist/client/static/js/async/ho.475a5e1ae4.js +1 -0
- package/dist/client/static/js/async/hp.e9fe2e395a.js +2 -0
- package/dist/client/static/js/async/hp.e9fe2e395a.js.LICENSE.txt +17 -0
- package/dist/client/static/js/async/hs.6d480d0ded.js +41 -0
- package/dist/client/static/js/async/i.7c148e8440.js +1 -0
- package/dist/client/static/js/async/id.573df20f29.js +1 -0
- package/dist/client/static/js/async/j.ab925882d8.js +1 -0
- package/dist/client/static/js/async/jd.63886a1f09.js +1 -0
- package/dist/client/static/js/async/jg.69a4beade8.js +86 -0
- package/dist/client/static/js/async/jl.874d352278.js +1 -0
- package/dist/client/static/js/async/jll.11313b455a.js +1 -0
- package/dist/client/static/js/async/js.67182759ef.js +1 -0
- package/dist/client/static/js/async/jsc.23b70d6f40.js +1 -0
- package/dist/client/static/js/async/jse.334588ff5d.js +1 -0
- package/dist/client/static/js/async/jz.72eb929106.js +77 -0
- package/dist/client/static/js/async/k.e878dd350f.js +217 -0
- package/dist/client/static/js/async/ka.c1990ecaa3.js +115 -0
- package/dist/client/static/js/async/ku.29c8a59d0c.js +1 -0
- package/dist/client/static/js/async/ky.8dab1dade0.js +1 -0
- package/dist/client/static/js/async/l.102a97fce6.js +104 -0
- package/dist/client/static/js/async/l6.45f3b62e15.js +1 -0
- package/dist/client/static/js/async/l9.949710adaf.js +83 -0
- package/dist/client/static/js/async/l9.949710adaf.js.LICENSE.txt +13 -0
- package/dist/client/static/js/async/m.3fc017a055.js +28 -0
- package/dist/client/static/js/async/m.3fc017a055.js.LICENSE.txt +6 -0
- package/dist/client/static/js/async/me.8ace414f80.js +23 -0
- package/dist/client/static/js/async/mt.0352e976d8.js +1 -0
- package/dist/client/static/js/async/n.a9f1c51701.js +1 -0
- package/dist/client/static/js/async/na.a36cd532d6.js +1 -0
- package/dist/client/static/js/async/nk.6de011832e.js +1 -0
- package/dist/client/static/js/async/o.36353dfb88.js +1 -0
- package/dist/client/static/js/async/oc.9c060c9779.js +8 -0
- package/dist/client/static/js/async/og.ae7acf03ac.js +193 -0
- package/dist/client/static/js/async/p.48ecfcd14e.js +1 -0
- package/dist/client/static/js/async/px.783b6f91f2.js +1 -0
- package/dist/client/static/js/async/q.0b6fb9bf8d.js +21 -0
- package/dist/client/static/js/async/q.0b6fb9bf8d.js.LICENSE.txt +6 -0
- package/dist/client/static/js/async/q5.e683f7c26e.js +286 -0
- package/dist/client/static/js/async/qs.2a9ddb3c72.js +1 -0
- package/dist/client/static/js/async/r.51010ad87c.js +1 -0
- package/dist/client/static/js/async/rd.b77011ab7f.js +2 -0
- package/dist/client/static/js/async/rd.b77011ab7f.js.LICENSE.txt +4 -0
- package/dist/client/static/js/async/rf.cfbde7f744.js +2 -0
- package/dist/client/static/js/async/rf.cfbde7f744.js.LICENSE.txt +6 -0
- package/dist/client/static/js/async/s.c7d521a8ae.js +2 -0
- package/dist/client/static/js/async/s.c7d521a8ae.js.LICENSE.txt +6 -0
- package/dist/client/static/js/async/sy.7345abcd67.js +94 -0
- package/dist/client/static/js/async/t.0dcb01dfde.js +1 -0
- package/dist/client/static/js/async/t9.d44f57d518.js +1 -0
- package/dist/client/static/js/async/ta.973534bbec.js +1 -0
- package/dist/client/static/js/async/ty.3d93cf5f5f.js +1 -0
- package/dist/client/static/js/async/u.0871ac5b22.js +1 -0
- package/dist/client/static/js/async/up.ea990da0ff.js +32 -0
- package/dist/client/static/js/async/uw.8890abbabc.js +1 -0
- package/dist/client/static/js/async/v.5c7a4b087b.js +1 -0
- package/dist/client/static/js/async/vn.e98e2f3b61.js +309 -0
- package/dist/client/static/js/async/vp.9b13bf8610.js +1 -0
- package/dist/client/static/js/async/vu.311f1d202c.js +34 -0
- package/dist/client/static/js/async/w.08ac210f60.js +1 -0
- package/dist/client/static/js/async/wt.ad92393a90.js +1 -0
- package/dist/client/static/js/async/x.563f72ca6b.js +1 -0
- package/dist/client/static/js/async/x0.475516418f.js +1 -0
- package/dist/client/static/js/async/x1.da8687159b.js +90 -0
- package/dist/client/static/js/async/xl.a3c562a58c.js +1 -0
- package/dist/client/static/js/async/xn.afecebbbd9.js +2 -0
- package/dist/client/static/js/async/xn.afecebbbd9.js.LICENSE.txt +12 -0
- package/dist/client/static/js/async/y.1a9ed7a5d8.js +1 -0
- package/dist/client/static/js/async/y6.43c57defe4.js +1 -0
- package/dist/client/static/js/async/yb.8c1342401d.js +1 -0
- package/dist/client/static/js/async/ybq.4491f2f2dc.js +1 -0
- package/dist/client/static/js/async/yg.9bd4e09ecb.js +149 -0
- package/dist/client/static/js/async/yq.917ddd7ba2.js +1 -0
- package/dist/client/static/js/async/ys.00687cf82d.js +38 -0
- package/dist/client/static/js/async/yv.593a3f7d54.js +1 -0
- package/dist/client/static/js/async/z.56f61a4374.js +1 -0
- package/dist/client/static/js/async/zi.5fdb07b86a.js +24 -0
- package/dist/client/static/js/async/zj.654f37e8ff.js +1 -0
- package/dist/client/static/js/async/zn.966d6f1cc6.js +1 -0
- package/dist/client/static/js/async/zo.26213b40c0.js +1 -0
- package/dist/client/static/js/async/zx.e9f4105e00.js +1 -0
- package/dist/client/static/js/g.124fba0826.js +139 -0
- package/dist/client/static/js/g.124fba0826.js.LICENSE.txt +8 -0
- package/dist/client/static/js/index.907fd4670e.js +68 -0
- package/dist/client/static/js/index.907fd4670e.js.LICENSE.txt +4 -0
- package/dist/client/static/js/katex-vendor.95e48cf65a.js +1 -0
- package/dist/client/static/js/markdown-vendor.9da142c67b.js +144 -0
- package/dist/client/static/js/shiki-vendor.cb8452ddcd.js +1 -0
- package/dist/client/sw.js +15 -0
- package/package.json +75 -0
- package/src/cli/lib/args.js +233 -0
- package/src/cli/lib/commands/logs.js +108 -0
- package/src/cli/lib/commands/restart.js +28 -0
- package/src/cli/lib/commands/serve.js +109 -0
- package/src/cli/lib/commands/status.js +63 -0
- package/src/cli/lib/commands/stop.js +63 -0
- package/src/cli/lib/commands/update.js +120 -0
- package/src/cli/lib/output.js +136 -0
- package/src/cli/lib/path-utils.js +48 -0
- package/src/cli/lib/path-utils.test.js +71 -0
- package/src/cli/lib/paths.js +60 -0
- package/src/cli/lib/process-lifecycle.js +110 -0
- package/src/cli/lib/runtime.js +280 -0
- package/src/cli/ompchamber.js +56 -0
- package/src/client/App.tsx +95 -0
- package/src/client/bootstrap.d.ts +12 -0
- package/src/client/components/common/ComposerPicker.tsx +116 -0
- package/src/client/components/common/ComposerTextarea.tsx +131 -0
- package/src/client/components/common/CopyButton.tsx +73 -0
- package/src/client/components/common/FolderPicker.tsx +270 -0
- package/src/client/components/common/MarkdownRenderer.tsx +107 -0
- package/src/client/components/common/Modal.tsx +75 -0
- package/src/client/components/common/PWAInstallButton.tsx +113 -0
- package/src/client/components/common/StatCard.tsx +52 -0
- package/src/client/components/common/StreamStatusDot.tsx +28 -0
- package/src/client/components/common/SubagentStatusIcon.tsx +27 -0
- package/src/client/components/common/Toast.tsx +79 -0
- package/src/client/components/common/ToastStack.tsx +18 -0
- package/src/client/components/common/ViewportSelector.tsx +206 -0
- package/src/client/components/common/code-editor/index.tsx +343 -0
- package/src/client/components/common/code-surface/index.tsx +75 -0
- package/src/client/components/common/file-icon/brand-paths.ts +62 -0
- package/src/client/components/common/file-icon/index.tsx +127 -0
- package/src/client/components/common/lazy-panels.tsx +80 -0
- package/src/client/components/common/session-state-provider/index.tsx +55 -0
- package/src/client/components/common/sort-menu/index.tsx +63 -0
- package/src/client/components/common/sort-menu/options.ts +24 -0
- package/src/client/components/common/viewport.ts +21 -0
- package/src/client/components/common/workspace-options-menu/index.tsx +84 -0
- package/src/client/components/layout/RightActivityBar.tsx +95 -0
- package/src/client/components/layout/desktop-layout/ResizeHandle.tsx +10 -0
- package/src/client/components/layout/desktop-layout/TopNavbar.tsx +94 -0
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +175 -0
- package/src/client/components/layout/desktop-layout/index.tsx +280 -0
- package/src/client/components/layout/desktop-layout/resizer/index.tsx +344 -0
- package/src/client/components/layout/session-sidebar/CategoryItem.tsx +264 -0
- package/src/client/components/layout/session-sidebar/Footer.tsx +28 -0
- package/src/client/components/layout/session-sidebar/Header.tsx +29 -0
- package/src/client/components/layout/session-sidebar/Modals.tsx +209 -0
- package/src/client/components/layout/session-sidebar/SessionItem.tsx +145 -0
- package/src/client/components/layout/session-sidebar/SessionList.tsx +52 -0
- package/src/client/components/layout/session-sidebar/Skeleton.tsx +36 -0
- package/src/client/components/layout/session-sidebar/SubagentList.tsx +152 -0
- package/src/client/components/layout/session-sidebar/Toolbar.tsx +123 -0
- package/src/client/components/layout/session-sidebar/about-modal/SocialLinks.tsx +43 -0
- package/src/client/components/layout/session-sidebar/about-modal/UpdateSection.tsx +172 -0
- package/src/client/components/layout/session-sidebar/about-modal/index.tsx +63 -0
- package/src/client/components/layout/session-sidebar/index.tsx +174 -0
- package/src/client/components/mobile/LayoutWrapper.tsx +221 -0
- package/src/client/components/mobile/MainView.tsx +68 -0
- package/src/client/components/mobile/RightSidebar.tsx +217 -0
- package/src/client/components/mobile/SessionSidebar.tsx +175 -0
- package/src/client/components/mobile/mobile-main-view/Header.tsx +264 -0
- package/src/client/components/mobile/mobile-right-sidebar/FullDiff.tsx +80 -0
- package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +141 -0
- package/src/client/components/mobile/mobile-right-sidebar/Header.tsx +121 -0
- package/src/client/components/mobile/mobile-session-sidebar/Footer.tsx +69 -0
- package/src/client/components/mobile/mobile-session-sidebar/Header.tsx +34 -0
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +168 -0
- package/src/client/components/mobile/mobile-session-sidebar/List.tsx +53 -0
- package/src/client/components/mobile/mobile-session-sidebar/SessionRow.tsx +99 -0
- package/src/client/components/mobile/mobile-session-sidebar/Skeleton.tsx +36 -0
- package/src/client/components/mobile/mobile-session-sidebar/Toolbar.tsx +176 -0
- package/src/client/components/settings/LoadingState.tsx +22 -0
- package/src/client/components/settings/Modal.tsx +277 -0
- package/src/client/components/settings/ProjectSelectorDropdown.tsx +142 -0
- package/src/client/components/settings/SettingsSidebarList.tsx +122 -0
- package/src/client/components/settings/Sidebar.tsx +153 -0
- package/src/client/components/settings/categories/AgentSettings.tsx +84 -0
- package/src/client/components/settings/categories/AppearanceSettings.tsx +50 -0
- package/src/client/components/settings/categories/BehaviorSettings.tsx +73 -0
- package/src/client/components/settings/categories/ChatSettings.tsx +24 -0
- package/src/client/components/settings/categories/CommandSettings.tsx +81 -0
- package/src/client/components/settings/categories/McpSettings.tsx +142 -0
- package/src/client/components/settings/categories/NotificationSettings.tsx +97 -0
- package/src/client/components/settings/categories/OmpSettings.tsx +312 -0
- package/src/client/components/settings/categories/OtherSettings.tsx +16 -0
- package/src/client/components/settings/categories/ProjectSettings.tsx +176 -0
- package/src/client/components/settings/categories/ProviderSettings.tsx +146 -0
- package/src/client/components/settings/categories/SkillCatalogSettings.tsx +309 -0
- package/src/client/components/settings/categories/SkillSettings.tsx +69 -0
- package/src/client/components/settings/categories/TokenUsageSettings.tsx +264 -0
- package/src/client/components/settings/categories/UsageSettings.tsx +77 -0
- package/src/client/components/settings/categories/agent-settings/DetailPane.tsx +333 -0
- package/src/client/components/settings/categories/agent-settings/SidebarList.tsx +42 -0
- package/src/client/components/settings/categories/behavior-settings/Editor.tsx +244 -0
- package/src/client/components/settings/categories/chat-settings/FollowUpSection.tsx +120 -0
- package/src/client/components/settings/categories/chat-settings/KeybindingsSection.tsx +107 -0
- package/src/client/components/settings/categories/chat-settings/TransportSection.tsx +101 -0
- package/src/client/components/settings/categories/command-settings/DetailPane.tsx +292 -0
- package/src/client/components/settings/categories/command-settings/SidebarList.tsx +39 -0
- package/src/client/components/settings/categories/mcp-settings/ConnectionTest.tsx +89 -0
- package/src/client/components/settings/categories/mcp-settings/DetailPane.tsx +311 -0
- package/src/client/components/settings/categories/mcp-settings/ImportModal.tsx +161 -0
- package/src/client/components/settings/categories/mcp-settings/SidebarList.tsx +120 -0
- package/src/client/components/settings/categories/omp-settings/ConfigTabs.tsx +243 -0
- package/src/client/components/settings/categories/omp-settings/ExtensionsPanel.tsx +61 -0
- package/src/client/components/settings/categories/omp-settings/RoleEditor.tsx +66 -0
- package/src/client/components/settings/categories/omp-settings/RowEditor.tsx +337 -0
- package/src/client/components/settings/categories/project-settings/AccentPalette.tsx +76 -0
- package/src/client/components/settings/categories/project-settings/DetailsForm.tsx +71 -0
- package/src/client/components/settings/categories/project-settings/DetailsHeader.tsx +38 -0
- package/src/client/components/settings/categories/project-settings/IconGrid.tsx +152 -0
- package/src/client/components/settings/categories/project-settings/ModelDropdown.tsx +95 -0
- package/src/client/components/settings/categories/project-settings/NameInput.tsx +26 -0
- package/src/client/components/settings/categories/project-settings/SidebarList.tsx +100 -0
- package/src/client/components/settings/categories/provider-settings/AddProviderModal.tsx +201 -0
- package/src/client/components/settings/categories/provider-settings/AuthSection.tsx +121 -0
- package/src/client/components/settings/categories/provider-settings/Header.tsx +22 -0
- package/src/client/components/settings/categories/provider-settings/Icons.tsx +35 -0
- package/src/client/components/settings/categories/provider-settings/LoginModal.tsx +224 -0
- package/src/client/components/settings/categories/provider-settings/ModelCapabilitiesModal.tsx +114 -0
- package/src/client/components/settings/categories/provider-settings/ModelConfigModal.tsx +155 -0
- package/src/client/components/settings/categories/provider-settings/ModelsList.tsx +191 -0
- package/src/client/components/settings/categories/provider-settings/ReconnectModal.tsx +163 -0
- package/src/client/components/settings/categories/provider-settings/SidebarList.tsx +133 -0
- package/src/client/components/settings/categories/skill-catalog/AddSourceModal.tsx +133 -0
- package/src/client/components/settings/categories/skill-settings/DetailPane.tsx +210 -0
- package/src/client/components/settings/categories/skill-settings/SidebarList.tsx +164 -0
- package/src/client/components/settings/categories/token-usage-settings/Breakdown.tsx +127 -0
- package/src/client/components/settings/categories/token-usage-settings/Chart.tsx +74 -0
- package/src/client/components/settings/categories/token-usage-settings/MetricsGrid.tsx +44 -0
- package/src/client/components/settings/categories/usage-settings/DeepSeekCard.tsx +66 -0
- package/src/client/components/settings/categories/usage-settings/KenariCard.tsx +68 -0
- package/src/client/components/settings/categories/usage-settings/ProviderCard.tsx +52 -0
- package/src/client/components/settings/categories/usage-settings/ProviderDetail.tsx +39 -0
- package/src/client/components/settings/categories/usage-settings/QuotaSection.tsx +93 -0
- package/src/client/components/settings/categories/usage-settings/SidebarList.tsx +77 -0
- package/src/client/components/settings/categories/usage-settings/UsageTable.tsx +66 -0
- package/src/client/components/settings/categories/usage-settings/format.ts +63 -0
- package/src/client/components/settings/categories/usage-settings/providers.ts +45 -0
- package/src/client/components/workspace/SearchPanel.tsx +259 -0
- package/src/client/components/workspace/browser-panel/ActivityToasts.tsx +46 -0
- package/src/client/components/workspace/browser-panel/AddressBar.tsx +84 -0
- package/src/client/components/workspace/browser-panel/Screencast.tsx +109 -0
- package/src/client/components/workspace/browser-panel/index.tsx +69 -0
- package/src/client/components/workspace/browser-toolbar/ZoomControls.tsx +48 -0
- package/src/client/components/workspace/browser-toolbar/index.tsx +140 -0
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.tsx +250 -0
- package/src/client/components/workspace/chat-timeline/AttachmentChips.tsx +119 -0
- package/src/client/components/workspace/chat-timeline/ComposerDock.tsx +121 -0
- package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +220 -0
- package/src/client/components/workspace/chat-timeline/GeneratingIndicator.tsx +94 -0
- package/src/client/components/workspace/chat-timeline/MessageItem.tsx +321 -0
- package/src/client/components/workspace/chat-timeline/MessageList.tsx +122 -0
- package/src/client/components/workspace/chat-timeline/MinimapShortcuts.tsx +47 -0
- package/src/client/components/workspace/chat-timeline/NewChatModal.tsx +69 -0
- package/src/client/components/workspace/chat-timeline/QueueList.tsx +94 -0
- package/src/client/components/workspace/chat-timeline/SessionSkeleton.tsx +89 -0
- package/src/client/components/workspace/chat-timeline/SubagentView.tsx +148 -0
- package/src/client/components/workspace/chat-timeline/SystemNotice.tsx +209 -0
- package/src/client/components/workspace/chat-timeline/TaskResultContent.tsx +175 -0
- package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +130 -0
- package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +130 -0
- package/src/client/components/workspace/chat-timeline/ToolCallCard.tsx +291 -0
- package/src/client/components/workspace/chat-timeline/ToolCallingSection.tsx +96 -0
- package/src/client/components/workspace/chat-timeline/UndoConfirmModal.tsx +83 -0
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +53 -0
- package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.tsx +63 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +49 -0
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +108 -0
- package/src/client/components/workspace/chat-timeline/chat-input/access-levels.ts +14 -0
- package/src/client/components/workspace/chat-timeline/chat-input/index.tsx +341 -0
- package/src/client/components/workspace/chat-timeline/index.tsx +290 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-dialog/Footer.tsx +97 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-dialog/Header.tsx +52 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-dialog/Lazy.tsx +24 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-dialog/SelectBody.tsx +110 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-dialog/index.tsx +321 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/hashline-patch/index.tsx +92 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/index.tsx +160 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Ask.tsx +205 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/AstEdit.tsx +202 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.tsx +223 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Checkpoint.tsx +49 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/ContextNotes.tsx +66 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Debug.tsx +91 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Edit.tsx +288 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Eval.tsx +202 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Github.tsx +91 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Goal.tsx +247 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Hub.tsx +273 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Lsp.tsx +276 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/ManageSkill.tsx +93 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Mcp.tsx +143 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Memory.tsx +93 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.tsx +246 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Resolve.tsx +96 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/SearchFs.tsx +132 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/SearchTool.tsx +317 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/SecurityScan.tsx +102 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/TaskResult.tsx +240 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Think.tsx +52 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Todo.tsx +141 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/WebSearch.tsx +118 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/DiffView.tsx +150 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/FallbackOutput.tsx +107 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/JsonCodeBlock.tsx +79 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolCardShell.tsx +151 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/read-line-meta.ts +95 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/tool-input.ts +18 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/truncate.ts +18 -0
- package/src/client/components/workspace/context-panel/CostBreakdownPopover.tsx +74 -0
- package/src/client/components/workspace/context-panel/LastMessageCard.tsx +34 -0
- package/src/client/components/workspace/context-panel/RawJsonViewer.tsx +94 -0
- package/src/client/components/workspace/context-panel/RawMessagesList.tsx +293 -0
- package/src/client/components/workspace/context-panel/StatsGrid.tsx +64 -0
- package/src/client/components/workspace/context-panel/TokenDistributionBar.tsx +62 -0
- package/src/client/components/workspace/context-panel/WindowCard.tsx +35 -0
- package/src/client/components/workspace/context-panel/index.tsx +142 -0
- package/src/client/components/workspace/context-panel/raw-messages.ts +54 -0
- package/src/client/components/workspace/diff-panel/SplitView.tsx +165 -0
- package/src/client/components/workspace/diff-panel/Toolbar.tsx +177 -0
- package/src/client/components/workspace/diff-panel/UnifiedView.tsx +117 -0
- package/src/client/components/workspace/diff-panel/index.tsx +213 -0
- package/src/client/components/workspace/editor/Tabs.tsx +149 -0
- package/src/client/components/workspace/editor/Toolbar.tsx +90 -0
- package/src/client/components/workspace/editor/index.tsx +189 -0
- package/src/client/components/workspace/file-explorer/GitRepoDropdown.tsx +143 -0
- package/src/client/components/workspace/file-explorer/Modals.tsx +236 -0
- package/src/client/components/workspace/file-explorer/TreeItem.tsx +289 -0
- package/src/client/components/workspace/file-explorer/index.tsx +193 -0
- package/src/client/components/workspace/git-panel/BranchToolbar.tsx +188 -0
- package/src/client/components/workspace/git-panel/ChangesList.tsx +168 -0
- package/src/client/components/workspace/git-panel/CommitBox.tsx +48 -0
- package/src/client/components/workspace/git-panel/FileItem.tsx +91 -0
- package/src/client/components/workspace/git-panel/Modals.tsx +97 -0
- package/src/client/components/workspace/git-panel/RepoHeader.tsx +137 -0
- package/src/client/components/workspace/git-panel/TreeItem.tsx +186 -0
- package/src/client/components/workspace/git-panel/TreeView.tsx +36 -0
- package/src/client/components/workspace/git-panel/commit-modal/CommitActions.tsx +97 -0
- package/src/client/components/workspace/git-panel/commit-modal/CommitDiffViewer.tsx +205 -0
- package/src/client/components/workspace/git-panel/commit-modal/CommitRow.tsx +179 -0
- package/src/client/components/workspace/git-panel/commit-modal/GraphCanvas.tsx +164 -0
- package/src/client/components/workspace/git-panel/commit-modal/Header.tsx +127 -0
- package/src/client/components/workspace/git-panel/commit-modal/index.tsx +269 -0
- package/src/client/components/workspace/git-panel/index.tsx +326 -0
- package/src/client/components/workspace/model-dropdown/Footer.tsx +21 -0
- package/src/client/components/workspace/model-dropdown/Header.tsx +50 -0
- package/src/client/components/workspace/model-dropdown/Item.tsx +137 -0
- package/src/client/components/workspace/model-dropdown/Panel.tsx +146 -0
- package/src/client/components/workspace/model-dropdown/Section.tsx +87 -0
- package/src/client/components/workspace/model-dropdown/Skeleton.tsx +39 -0
- package/src/client/components/workspace/model-dropdown/SpecsTooltip.tsx +91 -0
- package/src/client/components/workspace/model-dropdown/groups.ts +62 -0
- package/src/client/components/workspace/model-dropdown/index.tsx +245 -0
- package/src/client/components/workspace/model-dropdown/use-catalog.ts +111 -0
- package/src/client/components/workspace/terminal-panel/Header.tsx +50 -0
- package/src/client/components/workspace/terminal-panel/InputBar.tsx +82 -0
- package/src/client/components/workspace/terminal-panel/LogEntry.tsx +70 -0
- package/src/client/components/workspace/terminal-panel/QuickActions.tsx +39 -0
- package/src/client/components/workspace/terminal-panel/RealtimeXtermView.tsx +340 -0
- package/src/client/components/workspace/terminal-panel/index.tsx +110 -0
- package/src/client/components/workspace/usage-panel/ProviderSelect.tsx +208 -0
- package/src/client/components/workspace/usage-panel/index.tsx +98 -0
- package/src/client/components/workspace/user-browser-panel/AddressBar.tsx +134 -0
- package/src/client/components/workspace/user-browser-panel/Frame.tsx +72 -0
- package/src/client/components/workspace/user-browser-panel/index.tsx +87 -0
- package/src/client/data/agent-data/builtin.ts +31 -0
- package/src/client/data/agent-data/index.ts +10 -0
- package/src/client/data/agent-data/orchestrator.ts +113 -0
- package/src/client/data/agent-data/specialist.ts +245 -0
- package/src/client/data/context-data/index.test.ts +88 -0
- package/src/client/data/context-data/index.ts +310 -0
- package/src/client/data/context-data/presets.ts +128 -0
- package/src/client/data/mock/chat.ts +236 -0
- package/src/client/data/mock/git-commits.ts +304 -0
- package/src/client/data/mock/subagents.ts +212 -0
- package/src/client/data/mock/token-usage.ts +129 -0
- package/src/client/data/models/catalog.ts +293 -0
- package/src/client/data/samples/dialogue-session.ts +285 -0
- package/src/client/data/samples/sample-subagents/scout-raw.ts +341 -0
- package/src/client/data/samples/sample-subagents/sleeper-raw.ts +294 -0
- package/src/client/data/samples/sample-tools/built-in-part1.ts +265 -0
- package/src/client/data/samples/sample-tools/built-in-part2.ts +180 -0
- package/src/client/data/samples/sample-tools/other.ts +162 -0
- package/src/client/data/samples/subagent-session.ts +99 -0
- package/src/client/data/samples/tools-session.ts +85 -0
- package/src/client/data/samples/virtual-devices-session.ts +333 -0
- package/src/client/data/settings/behavior.ts +12 -0
- package/src/client/data/settings/command.ts +188 -0
- package/src/client/data/settings/mcp.ts +28 -0
- package/src/client/data/settings/omp-schema.json +1 -0
- package/src/client/data/settings/project.ts +58 -0
- package/src/client/data/settings/provider.ts +185 -0
- package/src/client/data/settings/skill.ts +340 -0
- package/src/client/data/theme/terminal.ts +150 -0
- package/src/client/hooks/browser/use-screencast.ts +178 -0
- package/src/client/hooks/browser/use-user-browser.ts +105 -0
- package/src/client/hooks/chat/composer/index.ts +181 -0
- package/src/client/hooks/chat/composer/items.ts +47 -0
- package/src/client/hooks/chat/omp/index.ts +348 -0
- package/src/client/hooks/chat/omp/revalidation-throttle.ts +71 -0
- package/src/client/hooks/chat/omp/session-list.tsx +148 -0
- package/src/client/hooks/chat/omp/session-sidebar-controller.ts +249 -0
- package/src/client/hooks/chat/omp/session-statuses.ts +83 -0
- package/src/client/hooks/chat/omp/status.ts +31 -0
- package/src/client/hooks/chat/omp/stream-poll.ts +37 -0
- package/src/client/hooks/chat/omp/stream.ts +108 -0
- package/src/client/hooks/chat/stream.ts +228 -0
- package/src/client/hooks/chat/subagent/index.ts +290 -0
- package/src/client/hooks/chat/timeline/actions.ts +322 -0
- package/src/client/hooks/chat/timeline/auto-scroll.ts +58 -0
- package/src/client/hooks/chat/timeline/browser-context.ts +40 -0
- package/src/client/hooks/chat/timeline/extension-dialog.ts +56 -0
- package/src/client/hooks/chat/timeline/index.ts +333 -0
- package/src/client/hooks/chat/timeline/queue.ts +87 -0
- package/src/client/hooks/chat/timeline/scroll.ts +134 -0
- package/src/client/hooks/chat/timeline/send.ts +348 -0
- package/src/client/hooks/chat/timeline/session-load.ts +334 -0
- package/src/client/hooks/chat/timeline/session-title.ts +40 -0
- package/src/client/hooks/chat/timeline/subagent-view.ts +92 -0
- package/src/client/hooks/chat/timeline/undo-confirmation.ts +29 -0
- package/src/client/hooks/editor/use-file-editor.ts +302 -0
- package/src/client/hooks/models/use-model-names.ts +17 -0
- package/src/client/hooks/models/use-models-catalog.ts +45 -0
- package/src/client/hooks/models/use-provider-names.ts +18 -0
- package/src/client/hooks/settings/crud-list.ts +187 -0
- package/src/client/hooks/settings/instruction-file.ts +91 -0
- package/src/client/hooks/settings/providers.ts +295 -0
- package/src/client/hooks/settings/skill-catalog.ts +37 -0
- package/src/client/hooks/settings/use-chamber-setting.ts +12 -0
- package/src/client/hooks/settings/useUsageReport.ts +41 -0
- package/src/client/hooks/ui/clipboard.ts +33 -0
- package/src/client/hooks/ui/copy-flag.ts +27 -0
- package/src/client/hooks/ui/inline-rename.ts +93 -0
- package/src/client/hooks/ui/notification-sound.ts +108 -0
- package/src/client/hooks/ui/on-click-outside.ts +22 -0
- package/src/client/hooks/ui/open-file.ts +42 -0
- package/src/client/hooks/ui/scrollbar-fade.ts +33 -0
- package/src/client/hooks/ui/show-more.ts +23 -0
- package/src/client/hooks/ui/syntax-ready.ts +17 -0
- package/src/client/hooks/ui/theme.ts +76 -0
- package/src/client/hooks/ui/toasts.ts +22 -0
- package/src/client/hooks/ui/updates.ts +108 -0
- package/src/client/hooks/ui/visibility-refresh.ts +66 -0
- package/src/client/hooks/ui/window-event.ts +52 -0
- package/src/client/hooks/workspace/commit-interactions.ts +111 -0
- package/src/client/hooks/workspace/commit-pagination.ts +106 -0
- package/src/client/hooks/workspace/file-tabs.ts +136 -0
- package/src/client/hooks/workspace/git-status.ts +89 -0
- package/src/client/hooks/workspace/git-tree.ts +146 -0
- package/src/client/hooks/workspace/panel-refresh.ts +72 -0
- package/src/client/hooks/workspace/panel-widths.ts +59 -0
- package/src/client/hooks/workspace/search-stream.ts +76 -0
- package/src/client/hooks/workspace/session-state/context.ts +15 -0
- package/src/client/hooks/workspace/session-state/index.ts +62 -0
- package/src/client/hooks/workspace/terminal-output.ts +66 -0
- package/src/client/hooks/workspace/terminal.ts +283 -0
- package/src/client/hooks/workspace/workspace-folder-actions.ts +110 -0
- package/src/client/lib/router/fetcher.ts +100 -0
- package/src/client/lib/router/search-params.ts +82 -0
- package/src/client/main.tsx +23 -0
- package/src/client/tailwind.css +364 -0
- package/src/server/db.server.ts +338 -0
- package/src/server/index.ts +19 -0
- package/src/server/lib/browser/runtime.test.ts +110 -0
- package/src/server/lib/browser/runtime.ts +160 -0
- package/src/server/lib/chat/session-store.server.ts +61 -0
- package/src/server/lib/db/client.ts +55 -0
- package/src/server/lib/db/settings-store.ts +148 -0
- package/src/server/lib/fs/atomic-write.ts +27 -0
- package/src/server/lib/fs/git-diff.ts +116 -0
- package/src/server/lib/fs/git-log.ts +174 -0
- package/src/server/lib/fs/repo-scope.ts +14 -0
- package/src/server/lib/fs/root.ts +77 -0
- package/src/server/lib/fs/shell.ts +71 -0
- package/src/server/lib/fs/terminal-cwd.ts +49 -0
- package/src/server/lib/models/provider-registry.server.ts +269 -0
- package/src/server/lib/omp/config/agents.ts +162 -0
- package/src/server/lib/omp/config/behavior.ts +113 -0
- package/src/server/lib/omp/config/config-cli.ts +94 -0
- package/src/server/lib/omp/config/disabled-providers.ts +68 -0
- package/src/server/lib/omp/config/extensions.ts +90 -0
- package/src/server/lib/omp/config/instructions.ts +81 -0
- package/src/server/lib/omp/config/mcp-test.ts +346 -0
- package/src/server/lib/omp/config/mcp.ts +258 -0
- package/src/server/lib/omp/config/providers.ts +276 -0
- package/src/server/lib/omp/config/roles.ts +46 -0
- package/src/server/lib/omp/config/skills-catalog.ts +93 -0
- package/src/server/lib/omp/config/skills.ts +118 -0
- package/src/server/lib/omp/config/yaml.ts +48 -0
- package/src/server/lib/omp/core/auth-credentials.ts +87 -0
- package/src/server/lib/omp/core/cli.ts +69 -0
- package/src/server/lib/omp/core/paths.ts +154 -0
- package/src/server/lib/omp/core/registry.ts +140 -0
- package/src/server/lib/omp/core/worktree.ts +106 -0
- package/src/server/lib/omp/rpc/constants.ts +185 -0
- package/src/server/lib/omp/rpc/errors.ts +27 -0
- package/src/server/lib/omp/rpc/kill-tree.ts +49 -0
- package/src/server/lib/omp/rpc/lines.ts +38 -0
- package/src/server/lib/omp/rpc/manager.ts +310 -0
- package/src/server/lib/omp/rpc/pending-ui-dialogs.ts +55 -0
- package/src/server/lib/omp/rpc/process-helpers.ts +82 -0
- package/src/server/lib/omp/rpc/process.ts +319 -0
- package/src/server/lib/omp/rpc/session-commands.ts +218 -0
- package/src/server/lib/omp/rpc/session-registry.ts +300 -0
- package/src/server/lib/omp/rpc/utility.ts +199 -0
- package/src/server/lib/omp/rpc/web-state.ts +94 -0
- package/src/server/lib/omp/session/files.ts +282 -0
- package/src/server/lib/omp/session/locator.ts +60 -0
- package/src/server/lib/omp/session/messages.ts +222 -0
- package/src/server/lib/omp/session/reader.ts +150 -0
- package/src/server/lib/omp/session/sidebar-data.server.ts +195 -0
- package/src/server/lib/omp/session/stats.ts +85 -0
- package/src/server/lib/omp/session/subagent-presence.ts +74 -0
- package/src/server/lib/omp/session/telemetry/compute.ts +188 -0
- package/src/server/lib/omp/session/telemetry/format.ts +110 -0
- package/src/server/lib/omp/session/telemetry/index.ts +4 -0
- package/src/server/lib/omp/session/telemetry/scan.ts +21 -0
- package/src/server/lib/omp/session/telemetry-raw.ts +96 -0
- package/src/server/lib/omp/session/telemetry.test.ts +154 -0
- package/src/server/lib/omp/session/title-slot.ts +203 -0
- package/src/server/lib/omp/session/usage.ts +298 -0
- package/src/server/lib/omp/subagent/history/fold.ts +196 -0
- package/src/server/lib/omp/subagent/history/index.ts +110 -0
- package/src/server/lib/omp/subagent/history/paths.ts +29 -0
- package/src/server/lib/omp/subagent/history/transcript.test.ts +87 -0
- package/src/server/lib/omp/subagent/history/transcript.ts +122 -0
- package/src/server/lib/remix-compat.ts +29 -0
- package/src/server/lib/route-adapter.ts +144 -0
- package/src/server/lib/sse.ts +248 -0
- package/src/server/lib/updates/apply.ts +46 -0
- package/src/server/lib/updates/check.ts +41 -0
- package/src/server/lib/updates/github.ts +71 -0
- package/src/server/lib/updates/install-method.ts +73 -0
- package/src/server/lib/updates/install.test.ts +74 -0
- package/src/server/lib/updates/install.ts +294 -0
- package/src/server/lib/updates/omp.ts +86 -0
- package/src/server/lib/usage/deepseek.ts +59 -0
- package/src/server/lib/usage/kenari.ts +251 -0
- package/src/server/lib/usage/provider-key.ts +83 -0
- package/src/server/mock.server.ts +33 -0
- package/src/server/plugins/compress.ts +51 -0
- package/src/server/plugins/dev-assets.ts +49 -0
- package/src/server/plugins/ssr.ts +100 -0
- package/src/server/plugins/static.ts +81 -0
- package/src/server/routes/agent/command.ts +81 -0
- package/src/server/routes/agent/events.ts +56 -0
- package/src/server/routes/agent/index.ts +12 -0
- package/src/server/routes/agent/new.ts +83 -0
- package/src/server/routes/agent/prewarm.ts +27 -0
- package/src/server/routes/agent/ws.ts +168 -0
- package/src/server/routes/browser/index.ts +6 -0
- package/src/server/routes/browser/stream.ts +217 -0
- package/src/server/routes/chat/index.ts +12 -0
- package/src/server/routes/chat/rewind.ts +162 -0
- package/src/server/routes/chat/root.ts +78 -0
- package/src/server/routes/chat/session.ts +339 -0
- package/src/server/routes/chat/stream.ts +111 -0
- package/src/server/routes/files/index.ts +10 -0
- package/src/server/routes/files/root.ts +29 -0
- package/src/server/routes/files/toggle.ts +20 -0
- package/src/server/routes/folders/create.ts +98 -0
- package/src/server/routes/folders/folder.ts +78 -0
- package/src/server/routes/folders/index.ts +16 -0
- package/src/server/routes/fs/action.ts +84 -0
- package/src/server/routes/fs/git.ts +334 -0
- package/src/server/routes/fs/index.ts +19 -0
- package/src/server/routes/fs/read.ts +258 -0
- package/src/server/routes/fs/replace.ts +69 -0
- package/src/server/routes/fs/search.ts +135 -0
- package/src/server/routes/fs/validate.ts +61 -0
- package/src/server/routes/health/index.ts +6 -0
- package/src/server/routes/health/probe.ts +27 -0
- package/src/server/routes/index.ts +38 -0
- package/src/server/routes/models/index.ts +8 -0
- package/src/server/routes/models/roles.ts +31 -0
- package/src/server/routes/models/root.ts +328 -0
- package/src/server/routes/omp/commands.ts +29 -0
- package/src/server/routes/omp/extensions.ts +34 -0
- package/src/server/routes/omp/index.ts +20 -0
- package/src/server/routes/omp/login.ts +112 -0
- package/src/server/routes/omp/plugins.ts +82 -0
- package/src/server/routes/omp/pricing.ts +65 -0
- package/src/server/routes/omp/session-stats.ts +30 -0
- package/src/server/routes/omp/sidebar.ts +40 -0
- package/src/server/routes/omp/state.ts +22 -0
- package/src/server/routes/sessions/folder.ts +16 -0
- package/src/server/routes/sessions/index.ts +25 -0
- package/src/server/routes/sessions/list.ts +23 -0
- package/src/server/routes/sessions/session.ts +331 -0
- package/src/server/routes/sessions/subagents.ts +82 -0
- package/src/server/routes/settings/agents.ts +128 -0
- package/src/server/routes/settings/behavior.ts +125 -0
- package/src/server/routes/settings/commands.ts +89 -0
- package/src/server/routes/settings/index.ts +28 -0
- package/src/server/routes/settings/mcp-test.ts +71 -0
- package/src/server/routes/settings/mcp.ts +261 -0
- package/src/server/routes/settings/omp-config.ts +47 -0
- package/src/server/routes/settings/projects.ts +84 -0
- package/src/server/routes/settings/provider-models.ts +278 -0
- package/src/server/routes/settings/providers.ts +137 -0
- package/src/server/routes/settings/root.ts +40 -0
- package/src/server/routes/settings/skills.ts +175 -0
- package/src/server/routes/settings/usage.ts +81 -0
- package/src/server/routes/telemetry/context.ts +52 -0
- package/src/server/routes/telemetry/index.ts +10 -0
- package/src/server/routes/telemetry/raw-messages.ts +80 -0
- package/src/server/routes/telemetry/tokens.ts +163 -0
- package/src/server/routes/terminal/index.ts +8 -0
- package/src/server/routes/terminal/run.ts +135 -0
- package/src/server/routes/terminal/stream.ts +100 -0
- package/src/server/routes/updates/apply.ts +25 -0
- package/src/server/routes/updates/check.ts +27 -0
- package/src/server/routes/updates/index.ts +8 -0
- package/src/server/routes/well-known/devtools.ts +9 -0
- package/src/server/routes/well-known/index.ts +6 -0
- package/src/shared/lib/browser/activity.ts +115 -0
- package/src/shared/lib/browser/cdp.ts +201 -0
- package/src/shared/lib/browser/connection.ts +81 -0
- package/src/shared/lib/browser/observer.ts +129 -0
- package/src/shared/lib/browser/page-context.ts +20 -0
- package/src/shared/lib/browser/targets.test.ts +45 -0
- package/src/shared/lib/browser/targets.ts +74 -0
- package/src/shared/lib/browser/url.ts +21 -0
- package/src/shared/lib/browser/util.ts +20 -0
- package/src/shared/lib/browser/viewer.ts +303 -0
- package/src/shared/lib/browser/watcher.ts +75 -0
- package/src/shared/lib/chat/attachments.ts +62 -0
- package/src/shared/lib/chat/capitalize.ts +9 -0
- package/src/shared/lib/chat/composer/client.ts +210 -0
- package/src/shared/lib/chat/composer/filter.ts +62 -0
- package/src/shared/lib/chat/composer/translate.ts +103 -0
- package/src/shared/lib/chat/composer/trigger.ts +53 -0
- package/src/shared/lib/chat/detect-format.ts +38 -0
- package/src/shared/lib/chat/duration.ts +82 -0
- package/src/shared/lib/chat/omp/agent-events.test.ts +152 -0
- package/src/shared/lib/chat/omp/agent-events.ts +347 -0
- package/src/shared/lib/chat/omp/file-mutations.ts +42 -0
- package/src/shared/lib/chat/omp/socket.ts +95 -0
- package/src/shared/lib/chat/omp/sse.ts +53 -0
- package/src/shared/lib/chat/omp/status.ts +45 -0
- package/src/shared/lib/chat/omp/transport.ts +50 -0
- package/src/shared/lib/chat/order.ts +40 -0
- package/src/shared/lib/chat/read-sse.ts +99 -0
- package/src/shared/lib/chat/stream-service.ts +273 -0
- package/src/shared/lib/chat/task-result-parser.ts +166 -0
- package/src/shared/lib/chat/timeline/omp-callbacks.ts +293 -0
- package/src/shared/lib/chat/timeline/stream-callbacks.ts +202 -0
- package/src/shared/lib/chat/timeline/stream-raf.ts +59 -0
- package/src/shared/lib/chat/timeline/tool-phrases.ts +224 -0
- package/src/shared/lib/chat/timeline/tool-verbs.ts +160 -0
- package/src/shared/lib/chat/timeline/turns.ts +30 -0
- package/src/shared/lib/chat/title-case.ts +293 -0
- package/src/shared/lib/chat/todo-parser.ts +257 -0
- package/src/shared/lib/chat/tool-status.ts +20 -0
- package/src/shared/lib/code/ansi.ts +24 -0
- package/src/shared/lib/code/editor-utils.ts +16 -0
- package/src/shared/lib/code/format.ts +17 -0
- package/src/shared/lib/code/highlighter.ts +135 -0
- package/src/shared/lib/code/parser.ts +237 -0
- package/src/shared/lib/code/shiki-langs.ts +93 -0
- package/src/shared/lib/code/shiki-themes.ts +14 -0
- package/src/shared/lib/code/syntax-highlight.test.ts +153 -0
- package/src/shared/lib/code/syntax-highlight.ts +290 -0
- package/src/shared/lib/db/transaction.server.ts +20 -0
- package/src/shared/lib/format/number.ts +69 -0
- package/src/shared/lib/format/time.ts +39 -0
- package/src/shared/lib/fs/diff-parser.ts +135 -0
- package/src/shared/lib/fs/file-tree.ts +26 -0
- package/src/shared/lib/fs/git-graph.ts +184 -0
- package/src/shared/lib/fs/git-status.ts +161 -0
- package/src/shared/lib/markdown/marked.ts +228 -0
- package/src/shared/lib/markdown/mermaid.ts +153 -0
- package/src/shared/lib/markdown/sanitize.ts +138 -0
- package/src/shared/lib/models/catalog.ts +88 -0
- package/src/shared/lib/models/client.ts +51 -0
- package/src/shared/lib/models/identity.ts +21 -0
- package/src/shared/lib/models/provider-cleanup.ts +20 -0
- package/src/shared/lib/models/provider-connection.ts +41 -0
- package/src/shared/lib/models/provider-label.ts +40 -0
- package/src/shared/lib/models/provider-models.ts +97 -0
- package/src/shared/lib/models/provider-presets.ts +29 -0
- package/src/shared/lib/models/remote-list.ts +125 -0
- package/src/shared/lib/models/server-cache.ts +27 -0
- package/src/shared/lib/models/thinking-levels.ts +68 -0
- package/src/shared/lib/omp/config/access-mode.server.ts +27 -0
- package/src/shared/lib/omp/config/access-mode.ts +31 -0
- package/src/shared/lib/omp/config/schema-extras.ts +230 -0
- package/src/shared/lib/omp/config/schema-types.ts +49 -0
- package/src/shared/lib/omp/config/schema.ts +81 -0
- package/src/shared/lib/omp/rpc/frame.ts +134 -0
- package/src/shared/lib/omp/session/default-title.test.ts +50 -0
- package/src/shared/lib/omp/session/default-title.ts +51 -0
- package/src/shared/lib/omp/session/hashline-patch.test.ts +89 -0
- package/src/shared/lib/omp/session/hashline-patch.ts +134 -0
- package/src/shared/lib/omp/session/jsonl.ts +197 -0
- package/src/shared/lib/omp/session/mapper.ts +145 -0
- package/src/shared/lib/omp/session/messages-map.ts +179 -0
- package/src/shared/lib/omp/session/messages-parse.ts +69 -0
- package/src/shared/lib/omp/session/parse-message-blocks.ts +223 -0
- package/src/shared/lib/omp/session/prewarm.ts +41 -0
- package/src/shared/lib/omp/session/sidebar.ts +77 -0
- package/src/shared/lib/omp/session/stream-state.server.ts +106 -0
- package/src/shared/lib/omp/session/telemetry-blocks.ts +60 -0
- package/src/shared/lib/omp/session/timestamps.ts +20 -0
- package/src/shared/lib/omp/session/turn-error.ts +40 -0
- package/src/shared/lib/omp/subagent/history/client.ts +76 -0
- package/src/shared/lib/omp/subagent/history/settlement.ts +113 -0
- package/src/shared/lib/omp/subagent/history/status.ts +40 -0
- package/src/shared/lib/omp/subagent/parse.ts +284 -0
- package/src/shared/lib/omp/subagent/result-details.ts +53 -0
- package/src/shared/lib/omp/subagent/transcript-client.ts +178 -0
- package/src/shared/lib/settings/client.test.ts +62 -0
- package/src/shared/lib/settings/client.ts +96 -0
- package/src/shared/lib/updates/semver.ts +34 -0
- package/src/shared/lib/util/guards.ts +14 -0
- package/src/shared/lib/workspace/active-project.ts +42 -0
- package/src/shared/lib/workspace/panel-widths.test.ts +72 -0
- package/src/shared/lib/workspace/panel-widths.ts +79 -0
- package/src/shared/lib/workspace/project-icon.ts +29 -0
- package/src/shared/lib/workspace/project-settings-migration.ts +62 -0
- package/src/shared/lib/workspace/project-settings.ts +139 -0
- package/src/shared/lib/workspace/refresh-cadence.ts +128 -0
- package/src/shared/lib/workspace/relative-time.ts +25 -0
- package/src/shared/lib/workspace/right-panels.ts +51 -0
- package/src/shared/lib/workspace/schema-migrations.ts +19 -0
- package/src/shared/lib/workspace/session-state/store.ts +267 -0
- package/src/shared/lib/workspace/sidebar-expanded.ts +23 -0
- package/src/shared/lib/workspace/sidebar-sort.test.ts +200 -0
- package/src/shared/lib/workspace/sidebar-sort.ts +131 -0
- package/src/shared/types/browser.ts +58 -0
- package/src/shared/types/chat.ts +289 -0
- package/src/shared/types/context.ts +87 -0
- package/src/shared/types/fs.ts +36 -0
- package/src/shared/types/git.ts +60 -0
- package/src/shared/types/index.ts +22 -0
- package/src/shared/types/omp/agent.ts +109 -0
- package/src/shared/types/omp/instructions.ts +38 -0
- package/src/shared/types/omp/session.ts +153 -0
- package/src/shared/types/omp/subagent.ts +176 -0
- package/src/shared/types/settings/agent.ts +16 -0
- package/src/shared/types/settings/command.ts +12 -0
- package/src/shared/types/settings/mcp.ts +22 -0
- package/src/shared/types/settings/project.ts +18 -0
- package/src/shared/types/settings/provider.ts +42 -0
- package/src/shared/types/settings/skill.ts +35 -0
- package/src/shared/types/settings/state.ts +59 -0
- package/src/shared/types/settings/usage.ts +99 -0
- package/src/shared/types/terminal.ts +19 -0
- package/src/shared/types/tokenUsage.ts +44 -0
- package/src/shared/types/updates.ts +38 -0
- package/src/shared/types/workspace.ts +56 -0
- package/tsconfig.json +26 -0
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { json } from '@/server/lib/remix-compat';
|
|
2
|
+
import type { ActionFunctionArgs, LoaderFunctionArgs } from '@/server/lib/remix-compat';
|
|
3
|
+
import { getDb } from '@/server/db.server';
|
|
4
|
+
import { INITIAL_MODELS_CATALOG } from '@/client/data/models/catalog';
|
|
5
|
+
import { isMockMode } from '@/server/mock.server';
|
|
6
|
+
import type { AIModelOption, ModelEntry, ModelsData, ProviderItem } from '@/shared/types';
|
|
7
|
+
import { readSettingsJson, writeSettingsJson } from '@/server/lib/db/settings-store';
|
|
8
|
+
import { runUtilityCommand, type OmpModel } from '@/server/lib/omp/rpc/utility';
|
|
9
|
+
import { readDisabledProviders } from '@/server/lib/omp/config/roles';
|
|
10
|
+
import { invalidateModelsCaches } from '@/shared/lib/models/server-cache';
|
|
11
|
+
|
|
12
|
+
const MODELS_CATALOG_KEY = 'omp_models_catalog';
|
|
13
|
+
const SELECTED_MODEL_KEY = 'omp_selected_model';
|
|
14
|
+
const PROVIDERS_CONFIG_KEY = 'omp_providers_config';
|
|
15
|
+
|
|
16
|
+
const MODELS_CACHE_TTL_MS = 60_000;
|
|
17
|
+
const SAFE_MODEL_LOAD_FAILURE_MESSAGE = 'Model list is temporarily unavailable. Check your configuration and try again.';
|
|
18
|
+
|
|
19
|
+
const modelNameCollator = new Intl.Collator(undefined, { numeric: true, sensitivity: 'base' });
|
|
20
|
+
|
|
21
|
+
function compareModelEntries(a: { id: string; name: string; provider: string }, b: { id: string; name: string; provider: string }): number {
|
|
22
|
+
return modelNameCollator.compare(a.name || a.id, b.name || b.id)
|
|
23
|
+
|| modelNameCollator.compare(a.provider, b.provider)
|
|
24
|
+
|| modelNameCollator.compare(a.id, b.id);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// "off" is always a valid selector; the concrete efforts come from the model's
|
|
28
|
+
// baked thinking metadata (omp: getSupportedEfforts = reasoning ? efforts : []).
|
|
29
|
+
function thinkingLevelsFor(model: OmpModel): string[] {
|
|
30
|
+
if (!model.reasoning) return ['off'];
|
|
31
|
+
return ['off', ...(model.thinking?.efforts ?? [])];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function supportsFastMode(model: OmpModel): boolean {
|
|
35
|
+
return model.provider === 'anthropic' || model.provider === 'openai' || model.provider === 'google';
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Disabled providers recorded in the chamber's own provider overlay. Used only
|
|
40
|
+
* by the MOCK path of `/api/models`, which has no config.yml `disabledProviders`
|
|
41
|
+
* to read — real mode gets the same answer natively.
|
|
42
|
+
*/
|
|
43
|
+
async function readStoredProvidersForModels(): Promise<ProviderItem[]> {
|
|
44
|
+
try {
|
|
45
|
+
const db = await getDb();
|
|
46
|
+
const parsed = await readSettingsJson<unknown>(db, PROVIDERS_CONFIG_KEY, null);
|
|
47
|
+
if (!Array.isArray(parsed)) return [];
|
|
48
|
+
return parsed.filter((provider): provider is ProviderItem => (
|
|
49
|
+
typeof provider === 'object' && provider !== null
|
|
50
|
+
&& typeof (provider as ProviderItem).slug === 'string'
|
|
51
|
+
&& (provider as ProviderItem).disabled === true
|
|
52
|
+
));
|
|
53
|
+
} catch {
|
|
54
|
+
return [];
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function hiddenModelKey(provider: string, modelId: string): string {
|
|
59
|
+
return `${provider.trim().toLowerCase()}:${modelId}`;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async function readHiddenModelKeys(): Promise<Set<string>> {
|
|
63
|
+
try {
|
|
64
|
+
const db = await getDb();
|
|
65
|
+
const parsed = await readSettingsJson<unknown>(db, PROVIDERS_CONFIG_KEY, null);
|
|
66
|
+
if (!Array.isArray(parsed)) return new Set();
|
|
67
|
+
const hidden = new Set<string>();
|
|
68
|
+
for (const provider of parsed) {
|
|
69
|
+
if (typeof provider?.slug !== 'string' || !Array.isArray(provider.models)) continue;
|
|
70
|
+
for (const model of provider.models) {
|
|
71
|
+
if (typeof model?.id === 'string' && model.isVisible === false) {
|
|
72
|
+
hidden.add(hiddenModelKey(provider.slug, model.id));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return hidden;
|
|
77
|
+
} catch {
|
|
78
|
+
return new Set();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* A model is offered only when its provider is neither disabled in omp's
|
|
84
|
+
* config.yml (`disabledProviders`) nor carrying a per-model hide in the
|
|
85
|
+
* chamber overlay. Disabling the provider is the coarse switch — Settings →
|
|
86
|
+
* Providers flips it so the whole provider leaves the chat picker.
|
|
87
|
+
*/
|
|
88
|
+
function filterSelectableModels(
|
|
89
|
+
available: OmpModel[],
|
|
90
|
+
disabledProviders: Set<string>,
|
|
91
|
+
hiddenModelKeys: Set<string>,
|
|
92
|
+
): OmpModel[] {
|
|
93
|
+
return available.filter((model) => (
|
|
94
|
+
!disabledProviders.has(model.provider)
|
|
95
|
+
&& !hiddenModelKeys.has(hiddenModelKey(model.provider, model.id))
|
|
96
|
+
));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
async function loadModels(): Promise<ModelsData> {
|
|
100
|
+
const availableResponse = await runUtilityCommand<{ models?: unknown }>(
|
|
101
|
+
{ type: 'get_available_models' },
|
|
102
|
+
120_000,
|
|
103
|
+
);
|
|
104
|
+
const available = Array.isArray(availableResponse.models)
|
|
105
|
+
? availableResponse.models
|
|
106
|
+
.filter((model): model is OmpModel => (
|
|
107
|
+
typeof model === 'object' && model !== null
|
|
108
|
+
&& typeof (model as OmpModel).id === 'string'
|
|
109
|
+
&& typeof (model as OmpModel).provider === 'string'
|
|
110
|
+
))
|
|
111
|
+
.map((model) => ({
|
|
112
|
+
...model,
|
|
113
|
+
name: typeof model.name === 'string' && model.name.trim().length > 0 ? model.name : model.id,
|
|
114
|
+
}))
|
|
115
|
+
: [];
|
|
116
|
+
|
|
117
|
+
const disabledProviders = await readDisabledProviders();
|
|
118
|
+
const hiddenModelKeys = await readHiddenModelKeys();
|
|
119
|
+
const nameMap: Record<string, string> = {};
|
|
120
|
+
const thinkingLevels: Record<string, string[]> = {};
|
|
121
|
+
const modelList: ModelEntry[] = filterSelectableModels(available, disabledProviders, hiddenModelKeys)
|
|
122
|
+
.map((m) => ({
|
|
123
|
+
id: m.id,
|
|
124
|
+
name: m.name,
|
|
125
|
+
provider: m.provider,
|
|
126
|
+
thinkingLevels: thinkingLevelsFor(m),
|
|
127
|
+
supportsFastMode: supportsFastMode(m),
|
|
128
|
+
contextWindow: m.contextWindow ?? undefined,
|
|
129
|
+
maxTokens: m.maxTokens ?? undefined,
|
|
130
|
+
cost: m.cost,
|
|
131
|
+
}))
|
|
132
|
+
.sort(compareModelEntries);
|
|
133
|
+
|
|
134
|
+
const loginResponse = await runUtilityCommand<{ providers?: unknown }>(
|
|
135
|
+
{ type: 'get_login_providers' },
|
|
136
|
+
30_000,
|
|
137
|
+
);
|
|
138
|
+
const loginProviders = Array.isArray(loginResponse.providers)
|
|
139
|
+
? loginResponse.providers.filter((provider): provider is { id: string; name: string; authenticated: boolean } => (
|
|
140
|
+
typeof provider === 'object' && provider !== null
|
|
141
|
+
&& typeof (provider as { id?: unknown }).id === 'string'
|
|
142
|
+
&& typeof (provider as { name?: unknown }).name === 'string'
|
|
143
|
+
&& typeof (provider as { authenticated?: unknown }).authenticated === 'boolean'
|
|
144
|
+
))
|
|
145
|
+
: [];
|
|
146
|
+
const connectedProviders = loginProviders
|
|
147
|
+
.filter((provider) => provider.authenticated)
|
|
148
|
+
.map((provider) => ({ id: provider.id, name: provider.name, disabled: disabledProviders.has(provider.id) }));
|
|
149
|
+
for (const m of available) {
|
|
150
|
+
const key = `${m.provider}:${m.id}`;
|
|
151
|
+
nameMap[key] = m.name;
|
|
152
|
+
thinkingLevels[key] = thinkingLevelsFor(m);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
let defaultModel: { provider: string; modelId: string } | null = null;
|
|
156
|
+
try {
|
|
157
|
+
const state = await runUtilityCommand<{ model?: { provider?: string; id?: string } }>(
|
|
158
|
+
{ type: 'get_state' },
|
|
159
|
+
30_000,
|
|
160
|
+
);
|
|
161
|
+
const provider = state.model?.provider;
|
|
162
|
+
const modelId = state.model?.id;
|
|
163
|
+
if (provider && modelId && available.some((m) => m.provider === provider && m.id === modelId)) {
|
|
164
|
+
defaultModel = { provider, modelId };
|
|
165
|
+
}
|
|
166
|
+
} catch {
|
|
167
|
+
// Default model is cosmetic — the models list is still useful without it.
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return { models: nameMap, modelList, defaultModel, thinkingLevels, connectedProviders };
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
const EMPTY_MODELS: ModelsData = {
|
|
174
|
+
models: {},
|
|
175
|
+
modelList: [],
|
|
176
|
+
defaultModel: null,
|
|
177
|
+
thinkingLevels: {},
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
async function loadModelsWithCache(): Promise<ModelsData> {
|
|
181
|
+
const cached = globalThis.__ompChamberModelsCache;
|
|
182
|
+
if (cached && cached.expiresAt > Date.now()) return cached.data;
|
|
183
|
+
const data = await loadModels();
|
|
184
|
+
globalThis.__ompChamberModelsCache = { data, expiresAt: Date.now() + MODELS_CACHE_TTL_MS };
|
|
185
|
+
return data;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
function invalidateModelsCache(): void {
|
|
189
|
+
invalidateModelsCaches();
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/** Parse a persisted { provider, modelId|id } reference without trusting the JSON shape. */
|
|
193
|
+
function readSelectedModelRef(value: unknown): { provider: string; modelId: string } | null {
|
|
194
|
+
if (typeof value !== 'object' || value === null) return null;
|
|
195
|
+
const candidate = value as { provider?: unknown; modelId?: unknown; id?: unknown };
|
|
196
|
+
if (typeof candidate.provider !== 'string' || candidate.provider.length === 0) return null;
|
|
197
|
+
const modelId = candidate.modelId ?? candidate.id;
|
|
198
|
+
if (typeof modelId !== 'string' || modelId.length === 0) return null;
|
|
199
|
+
return { provider: candidate.provider, modelId };
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/** The user's persisted pick resolved against the live registry; null when stale or unparseable. */
|
|
203
|
+
async function loadPersistedModelOption(modelList: ModelEntry[]): Promise<AIModelOption | null> {
|
|
204
|
+
try {
|
|
205
|
+
const db = await getDb();
|
|
206
|
+
const selected = readSelectedModelRef(await readSettingsJson<unknown>(db, SELECTED_MODEL_KEY, null));
|
|
207
|
+
if (!selected) return null;
|
|
208
|
+
const match = modelList.find(m => m.id === selected.modelId && m.provider === selected.provider);
|
|
209
|
+
if (!match) return null;
|
|
210
|
+
return {
|
|
211
|
+
id: match.id,
|
|
212
|
+
name: match.name,
|
|
213
|
+
provider: match.provider,
|
|
214
|
+
contextWindow: match.contextWindow,
|
|
215
|
+
thinkingLevels: match.thinkingLevels,
|
|
216
|
+
thinkingLevel: match.thinkingLevels?.[0],
|
|
217
|
+
};
|
|
218
|
+
} catch {
|
|
219
|
+
return null;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export async function loader({ request }: LoaderFunctionArgs) {
|
|
224
|
+
const mock = isMockMode();
|
|
225
|
+
|
|
226
|
+
// MOCK mode keeps the SQLite-backed catalog (chamber demo behavior).
|
|
227
|
+
if (mock) {
|
|
228
|
+
try {
|
|
229
|
+
const db = await getDb();
|
|
230
|
+
const catalog = await readSettingsJson<unknown>(db, MODELS_CATALOG_KEY, null);
|
|
231
|
+
const stored: AIModelOption[] = Array.isArray(catalog) && catalog.length > 0 ? catalog : INITIAL_MODELS_CATALOG;
|
|
232
|
+
// Demo mode has no config.yml to read, so the disable flag lives on the
|
|
233
|
+
// stored provider overlay. Filtering here keeps the model picker honest
|
|
234
|
+
// in MOCK=true too — the settings page must be able to prove the switch.
|
|
235
|
+
const disabledSlugs = new Set(
|
|
236
|
+
(await readStoredProvidersForModels()).map((provider) => provider.slug.trim().toLowerCase()),
|
|
237
|
+
);
|
|
238
|
+
const models = stored.filter((model) => !disabledSlugs.has(model.provider.trim().toLowerCase()));
|
|
239
|
+
const persisted = await readSettingsJson<AIModelOption | null>(db, SELECTED_MODEL_KEY, null);
|
|
240
|
+
// Every provider disabled ⇒ empty list and no selection; the composer must
|
|
241
|
+
// see that honestly instead of holding on to a hidden provider's model.
|
|
242
|
+
let selectedModel: AIModelOption | null = models[5] || models[0] || null;
|
|
243
|
+
if (persisted && persisted.id && persisted.provider) {
|
|
244
|
+
const match = models.find(m => m.id === persisted.id && m.provider === persisted.provider);
|
|
245
|
+
if (match) selectedModel = match;
|
|
246
|
+
}
|
|
247
|
+
return json({ models, selectedModel, isMock: mock });
|
|
248
|
+
} catch (error: any) {
|
|
249
|
+
return json({
|
|
250
|
+
error: error.message,
|
|
251
|
+
models: INITIAL_MODELS_CATALOG,
|
|
252
|
+
selectedModel: INITIAL_MODELS_CATALOG[5] || INITIAL_MODELS_CATALOG[0] || null,
|
|
253
|
+
isMock: mock,
|
|
254
|
+
}, { status: 500 });
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// Real mode: read the omp model registry via the shared utility RPC process.
|
|
259
|
+
// The ?cwd= query param is accepted for client compatibility but ignored —
|
|
260
|
+
// the omp model registry (auth + models.yml) is global, not per-cwd.
|
|
261
|
+
void request;
|
|
262
|
+
try {
|
|
263
|
+
const data = await loadModelsWithCache();
|
|
264
|
+
// The selection changes independently of the 60s registry cache.
|
|
265
|
+
return json({ ...data, selectedModel: await loadPersistedModelOption(data.modelList) });
|
|
266
|
+
} catch {
|
|
267
|
+
return json({ ...EMPTY_MODELS, modelError: SAFE_MODEL_LOAD_FAILURE_MESSAGE });
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export async function action({ request }: ActionFunctionArgs) {
|
|
272
|
+
try {
|
|
273
|
+
const db = await getDb();
|
|
274
|
+
const body = await request.json();
|
|
275
|
+
|
|
276
|
+
const catalog = await readSettingsJson<unknown>(db, MODELS_CATALOG_KEY, null);
|
|
277
|
+
let models: AIModelOption[] = Array.isArray(catalog) ? catalog : INITIAL_MODELS_CATALOG;
|
|
278
|
+
|
|
279
|
+
const { actionType, modelId, provider, thinkingLevel, model, models: newModels } = body;
|
|
280
|
+
|
|
281
|
+
// Model-scoped mutations must match provider + id: the registry serves the
|
|
282
|
+
// same model id from several providers, so an id-only match rewrites the
|
|
283
|
+
// first provider's entry instead of the one the user acted on.
|
|
284
|
+
if (actionType === 'toggleFavorite' && modelId && provider) {
|
|
285
|
+
models = models.map(m => m.id === modelId && m.provider === provider ? { ...m, isFavorite: !m.isFavorite } : m);
|
|
286
|
+
await writeSettingsJson(db, MODELS_CATALOG_KEY, models);
|
|
287
|
+
return json({ success: true, models });
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
if (actionType === 'setThinking' && modelId && provider && thinkingLevel) {
|
|
291
|
+
models = models.map(m => m.id === modelId && m.provider === provider ? { ...m, thinkingLevel } : m);
|
|
292
|
+
await writeSettingsJson(db, MODELS_CATALOG_KEY, models);
|
|
293
|
+
return json({ success: true, models });
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
if (actionType === 'toggleCmd' && modelId && provider) {
|
|
297
|
+
models = models.map(m => m.id === modelId && m.provider === provider ? { ...m, isCmdAgent: !m.isCmdAgent } : m);
|
|
298
|
+
await writeSettingsJson(db, MODELS_CATALOG_KEY, models);
|
|
299
|
+
return json({ success: true, models });
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
if (actionType === 'selectModel' && model) {
|
|
303
|
+
await writeSettingsJson(db, SELECTED_MODEL_KEY, model);
|
|
304
|
+
const parsedModel = readSelectedModelRef(model);
|
|
305
|
+
if (parsedModel) {
|
|
306
|
+
invalidateModelsCache();
|
|
307
|
+
// Live set_model against the current session is handled by the agent
|
|
308
|
+
// RPC bridge; here we only persist the selection for session spawn.
|
|
309
|
+
}
|
|
310
|
+
return json({ success: true, selectedModel: model });
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
if (actionType === 'addModel' && model) {
|
|
314
|
+
models.push(model);
|
|
315
|
+
await writeSettingsJson(db, MODELS_CATALOG_KEY, models);
|
|
316
|
+
return json({ success: true, models });
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
if (actionType === 'saveAll' && Array.isArray(newModels)) {
|
|
320
|
+
await writeSettingsJson(db, MODELS_CATALOG_KEY, newModels);
|
|
321
|
+
return json({ success: true, models: newModels });
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
return json({ error: 'Invalid action or parameters' }, { status: 400 });
|
|
325
|
+
} catch (error: any) {
|
|
326
|
+
return json({ error: error.message }, { status: 500 });
|
|
327
|
+
}
|
|
328
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { json } from '@/server/lib/remix-compat';
|
|
2
|
+
import type { LoaderFunctionArgs } from '@/server/lib/remix-compat';
|
|
3
|
+
import { isMockMode } from '@/server/mock.server';
|
|
4
|
+
import { runUtilityCommand } from '@/server/lib/omp/rpc/utility';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Live slash-command/skill/extension discovery from the omp agent
|
|
8
|
+
* (get_available_commands). Each command carries its source
|
|
9
|
+
* (builtin | skill | extension | custom | mcp_prompt | file), so the skills
|
|
10
|
+
* and commands settings tabs can merge real agent-registered entries.
|
|
11
|
+
*/
|
|
12
|
+
export async function loader({ request }: LoaderFunctionArgs) {
|
|
13
|
+
const mock = isMockMode();
|
|
14
|
+
if (mock) {
|
|
15
|
+
return json({ commands: [], isMock: true });
|
|
16
|
+
}
|
|
17
|
+
const url = new URL(request.url);
|
|
18
|
+
const source = url.searchParams.get('source');
|
|
19
|
+
try {
|
|
20
|
+
const data = await runUtilityCommand<{ commands?: unknown }>({ type: 'get_available_commands' }, 30_000);
|
|
21
|
+
const commands = Array.isArray(data.commands) ? data.commands : [];
|
|
22
|
+
const filtered = source
|
|
23
|
+
? commands.filter((c) => (c as { source?: string })?.source === source)
|
|
24
|
+
: commands;
|
|
25
|
+
return json({ commands: filtered, isMock: false });
|
|
26
|
+
} catch (error: any) {
|
|
27
|
+
return json({ commands: [], isMock: false, error: error.message });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { json } from '@/server/lib/remix-compat';
|
|
2
|
+
import type { ActionFunctionArgs, LoaderFunctionArgs } from '@/server/lib/remix-compat';
|
|
3
|
+
import { methodNotAllowed } from '@/server/lib/route-adapter';
|
|
4
|
+
import { isMockMode } from '@/server/mock.server';
|
|
5
|
+
import { discoverExtensions, setExtensionDisabled } from '@/server/lib/omp/config/extensions';
|
|
6
|
+
|
|
7
|
+
export async function loader({ request }: LoaderFunctionArgs) {
|
|
8
|
+
const mock = isMockMode();
|
|
9
|
+
if (mock) {
|
|
10
|
+
return json({ extensions: [], isMock: true });
|
|
11
|
+
}
|
|
12
|
+
const url = new URL(request.url);
|
|
13
|
+
const cwd = url.searchParams.get('cwd') ?? undefined;
|
|
14
|
+
return json({ extensions: await discoverExtensions(cwd), isMock: false });
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export async function action({ request, params }: ActionFunctionArgs) {
|
|
18
|
+
if (request.method !== 'POST') {
|
|
19
|
+
return methodNotAllowed({ request, params });
|
|
20
|
+
}
|
|
21
|
+
try {
|
|
22
|
+
const body = await request.json();
|
|
23
|
+
if (typeof body.id !== 'string' || typeof body.disabled !== 'boolean') {
|
|
24
|
+
return json({ error: 'id and disabled are required' }, { status: 400 });
|
|
25
|
+
}
|
|
26
|
+
if (isMockMode()) {
|
|
27
|
+
return json({ error: 'Extension toggles are unavailable in mock mode' }, { status: 400 });
|
|
28
|
+
}
|
|
29
|
+
const changed = await setExtensionDisabled(body.id, body.disabled);
|
|
30
|
+
return json({ success: true, changed });
|
|
31
|
+
} catch (error: any) {
|
|
32
|
+
return json({ error: error.message }, { status: 500 });
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { bindingsFor, type HandlerBinding } from '@/server/lib/route-adapter';
|
|
2
|
+
import * as ompState from '@/server/routes/omp/state';
|
|
3
|
+
import * as ompSidebar from '@/server/routes/omp/sidebar';
|
|
4
|
+
import * as ompSessionStats from '@/server/routes/omp/session-stats';
|
|
5
|
+
import * as ompCommands from '@/server/routes/omp/commands';
|
|
6
|
+
import * as ompExtensions from '@/server/routes/omp/extensions';
|
|
7
|
+
import * as ompLogin from '@/server/routes/omp/login';
|
|
8
|
+
import * as ompPlugins from '@/server/routes/omp/plugins';
|
|
9
|
+
import * as ompPricing from '@/server/routes/omp/pricing';
|
|
10
|
+
|
|
11
|
+
export const ompBindings: HandlerBinding[] = [
|
|
12
|
+
...bindingsFor(ompState, '/api/omp/state'),
|
|
13
|
+
...bindingsFor(ompSidebar, '/api/omp/sidebar'),
|
|
14
|
+
...bindingsFor(ompSessionStats, '/api/omp/session-stats'),
|
|
15
|
+
...bindingsFor(ompCommands, '/api/omp/commands'),
|
|
16
|
+
...bindingsFor(ompExtensions, '/api/omp/extensions'),
|
|
17
|
+
...bindingsFor(ompLogin, '/api/omp/login'),
|
|
18
|
+
...bindingsFor(ompPlugins, '/api/omp/plugins'),
|
|
19
|
+
...bindingsFor(ompPricing, '/api/omp/pricing'),
|
|
20
|
+
];
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Provider login flow over a dedicated throwaway omp RPC process.
|
|
8
|
+
*
|
|
9
|
+
* POST returns an SSE stream of `extension_ui_request` frames (open_url for
|
|
10
|
+
* OAuth, input/confirm for API keys, notify for status). The client replies
|
|
11
|
+
* by POSTing `extension_ui_response` frames to the same endpoint; they are
|
|
12
|
+
* forwarded into the running login process. The stream ends when the login
|
|
13
|
+
* command resolves, fails, or the client disconnects.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { json } from '@/server/lib/remix-compat';
|
|
17
|
+
import type { ActionFunctionArgs } from '@/server/lib/remix-compat';
|
|
18
|
+
import { methodNotAllowed } from '@/server/lib/route-adapter';
|
|
19
|
+
import { RpcProcess } from '@/server/lib/omp/rpc/process';
|
|
20
|
+
import { isMockMode } from '@/server/mock.server';
|
|
21
|
+
import { createSseStream } from '@/server/lib/sse';
|
|
22
|
+
|
|
23
|
+
const READY_TIMEOUT_MS = 30_000;
|
|
24
|
+
const LOGIN_TIMEOUT_MS = 300_000;
|
|
25
|
+
|
|
26
|
+
export async function action({ request, params }: ActionFunctionArgs) {
|
|
27
|
+
if (request.method !== 'POST') {
|
|
28
|
+
return methodNotAllowed({ request, params });
|
|
29
|
+
}
|
|
30
|
+
const body = await request.json().catch(() => null);
|
|
31
|
+
|
|
32
|
+
// Response forwarding: an in-flight login posts an extension_ui_response frame.
|
|
33
|
+
const isUiResponse = body && typeof body.id === 'string' && body.type === 'extension_ui_response';
|
|
34
|
+
const forward = isUiResponse
|
|
35
|
+
? (globalThis.__ompChamberLoginResponseSink as ((frame: { type: string; [key: string]: unknown }) => void) | undefined)
|
|
36
|
+
: undefined;
|
|
37
|
+
if (forward) {
|
|
38
|
+
forward(body as { type: string; [key: string]: unknown });
|
|
39
|
+
return json({ success: true });
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (!body || typeof body.providerId !== 'string' || !body.providerId.trim()) {
|
|
43
|
+
return json({ error: 'providerId is required' }, { status: 400 });
|
|
44
|
+
}
|
|
45
|
+
if (isMockMode()) {
|
|
46
|
+
return json({ error: 'Login is unavailable in mock mode' }, { status: 400 });
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const providerId = body.providerId;
|
|
50
|
+
|
|
51
|
+
const stream = createSseStream({
|
|
52
|
+
async onStart(handlers) {
|
|
53
|
+
let closed = false;
|
|
54
|
+
let sink: ((frame: Record<string, unknown>) => void) | null = null;
|
|
55
|
+
|
|
56
|
+
const cleanup = () => {
|
|
57
|
+
if (closed) return;
|
|
58
|
+
closed = true;
|
|
59
|
+
globalThis.__ompChamberLoginResponseSink = undefined;
|
|
60
|
+
handlers.close();
|
|
61
|
+
};
|
|
62
|
+
const send = (data: unknown) => {
|
|
63
|
+
if (closed) return;
|
|
64
|
+
handlers.send('', data);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
globalThis.__ompChamberLoginResponseSink = (frame) => sink?.(frame);
|
|
68
|
+
|
|
69
|
+
const proc = new RpcProcess({ cwd: '/', extraArgs: ['--no-session', '--no-skills', '--no-lsp'] });
|
|
70
|
+
const onAbort = () => { void proc.dispose(); cleanup(); };
|
|
71
|
+
request.signal?.addEventListener('abort', onAbort, { once: true });
|
|
72
|
+
|
|
73
|
+
try {
|
|
74
|
+
const ready = await proc.waitReady(READY_TIMEOUT_MS);
|
|
75
|
+
await proc.negotiateProtocol(ready);
|
|
76
|
+
const unsubscribe = proc.onFrame((frame) => {
|
|
77
|
+
if (frame.type === 'extension_ui_request') send(frame);
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
sink = (frame) => proc.sendFrame({ type: 'extension_ui_response', ...frame });
|
|
81
|
+
|
|
82
|
+
let loginOk = false;
|
|
83
|
+
let loginError: string | undefined;
|
|
84
|
+
try {
|
|
85
|
+
await proc.sendCommand({ type: 'login', providerId }, LOGIN_TIMEOUT_MS);
|
|
86
|
+
loginOk = true;
|
|
87
|
+
} catch (error) {
|
|
88
|
+
loginError = error instanceof Error ? error.message : String(error);
|
|
89
|
+
} finally {
|
|
90
|
+
unsubscribe();
|
|
91
|
+
send({ type: 'login_result', providerId, success: loginOk, ...(loginError ? { error: loginError } : {}) });
|
|
92
|
+
cleanup();
|
|
93
|
+
}
|
|
94
|
+
} catch (error) {
|
|
95
|
+
send({ type: 'login_result', providerId, success: false, error: error instanceof Error ? error.message : String(error) });
|
|
96
|
+
cleanup();
|
|
97
|
+
} finally {
|
|
98
|
+
request.signal?.removeEventListener('abort', onAbort);
|
|
99
|
+
void proc.dispose();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return cleanup;
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
return stream.response;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
declare global {
|
|
110
|
+
// eslint-disable-next-line no-var
|
|
111
|
+
var __ompChamberLoginResponseSink: ((frame: Record<string, unknown>) => void) | undefined;
|
|
112
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { json } from '@/server/lib/remix-compat';
|
|
2
|
+
import type { ActionFunctionArgs, LoaderFunctionArgs } from '@/server/lib/remix-compat';
|
|
3
|
+
import { methodNotAllowed } from '@/server/lib/route-adapter';
|
|
4
|
+
import { isMockMode } from '@/server/mock.server';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* omp plugin CLI bridge — list/install/uninstall/enable/disable through the
|
|
8
|
+
* real `omp plugin` command. The CLI is authoritative (own lockfile, npm/link
|
|
9
|
+
* installs) so shelling out beats reimplementing its registry logic.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const TIMEOUT_MS = 120_000;
|
|
13
|
+
|
|
14
|
+
function runPlugin(args: string[]): Promise<string> {
|
|
15
|
+
return (async () => {
|
|
16
|
+
const proc = Bun.spawn({
|
|
17
|
+
cmd: ['omp', 'plugin', ...args],
|
|
18
|
+
stdout: 'pipe',
|
|
19
|
+
stderr: 'pipe',
|
|
20
|
+
timeout: TIMEOUT_MS,
|
|
21
|
+
maxBuffer: 4 * 1024 * 1024,
|
|
22
|
+
windowsHide: true,
|
|
23
|
+
});
|
|
24
|
+
const [stdout, stderr] = await Promise.all([
|
|
25
|
+
new Response(proc.stdout).text(),
|
|
26
|
+
new Response(proc.stderr).text(),
|
|
27
|
+
]);
|
|
28
|
+
const exitCode = await proc.exited;
|
|
29
|
+
if (exitCode !== 0) throw new Error(stderr.trim() || `omp plugin ${args[0]} exited with code ${exitCode}`);
|
|
30
|
+
return stdout;
|
|
31
|
+
})();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export async function loader({ request: _request }: LoaderFunctionArgs) {
|
|
35
|
+
const mock = isMockMode();
|
|
36
|
+
if (mock) {
|
|
37
|
+
return json({ plugins: [], raw: '', isMock: true });
|
|
38
|
+
}
|
|
39
|
+
try {
|
|
40
|
+
const raw = await runPlugin(['list']);
|
|
41
|
+
return json({ plugins: parsePluginList(raw), raw, isMock: false });
|
|
42
|
+
} catch (error: any) {
|
|
43
|
+
return json({ plugins: [], raw: '', isMock: false, error: error.message }, { status: 500 });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** Parse `omp plugin list` text lines: "name <detail>" per installed plugin. */
|
|
48
|
+
function parsePluginList(raw: string): Array<{ name: string; detail: string }> {
|
|
49
|
+
return raw
|
|
50
|
+
.split(/\r?\n/)
|
|
51
|
+
.map((line) => line.trim())
|
|
52
|
+
.filter((line) => line.length > 0 && !/^no plugins installed/i.test(line) && !/^install plugins with:/i.test(line))
|
|
53
|
+
.map((line) => {
|
|
54
|
+
const match = /^(\S+)\s*(.*)$/.exec(line);
|
|
55
|
+
return match ? { name: match[1], detail: match[2] ?? '' } : { name: line, detail: '' };
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export async function action({ request, params }: ActionFunctionArgs) {
|
|
60
|
+
if (request.method !== 'POST') {
|
|
61
|
+
return methodNotAllowed({ request, params });
|
|
62
|
+
}
|
|
63
|
+
try {
|
|
64
|
+
const body = await request.json();
|
|
65
|
+
const action = typeof body.action === 'string' ? body.action : '';
|
|
66
|
+
const allowed = ['install', 'uninstall', 'upgrade', 'enable', 'disable'];
|
|
67
|
+
if (!allowed.includes(action)) {
|
|
68
|
+
return json({ error: `action must be one of: ${allowed.join(', ')}` }, { status: 400 });
|
|
69
|
+
}
|
|
70
|
+
if (typeof body.source !== 'string' || !body.source.trim()) {
|
|
71
|
+
return json({ error: 'source (plugin package name) is required' }, { status: 400 });
|
|
72
|
+
}
|
|
73
|
+
if (isMockMode()) {
|
|
74
|
+
return json({ error: 'Plugin actions are unavailable in mock mode' }, { status: 400 });
|
|
75
|
+
}
|
|
76
|
+
const output = await runPlugin([action, body.source]);
|
|
77
|
+
const list = await runPlugin(['list']);
|
|
78
|
+
return json({ success: true, action, output, plugins: parsePluginList(list) });
|
|
79
|
+
} catch (error: any) {
|
|
80
|
+
return json({ error: error.message }, { status: 500 });
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { json } from '@/server/lib/remix-compat';
|
|
2
|
+
import type { LoaderFunctionArgs } from '@/server/lib/remix-compat';
|
|
3
|
+
import { isMockMode } from '@/server/mock.server';
|
|
4
|
+
import { loadModelsDevCatalog } from '@/shared/lib/models/catalog';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Model pricing catalog from https://models.dev/api.json (shared 1h in-memory
|
|
8
|
+
* cache), the same source ompweb uses. Cost values are per million tokens.
|
|
9
|
+
* Query `?provider=<id>` to filter, or `?id=<provider>/<model>` for one entry.
|
|
10
|
+
*
|
|
11
|
+
* Pricing keeps a longer 20s fetch timeout than the default catalog loader and
|
|
12
|
+
* surfaces failures through its own error envelope, so it opts into both.
|
|
13
|
+
*/
|
|
14
|
+
const PRICING_TIMEOUT_MS = 20_000;
|
|
15
|
+
|
|
16
|
+
interface CatalogModel {
|
|
17
|
+
id?: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
cost?: { input?: number; output?: number; cacheRead?: number; cacheWrite?: number };
|
|
20
|
+
limit?: { context?: number; output?: number };
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export async function loader({ request }: LoaderFunctionArgs) {
|
|
24
|
+
const mock = isMockMode();
|
|
25
|
+
if (mock) {
|
|
26
|
+
return json({ providers: {}, isMock: true });
|
|
27
|
+
}
|
|
28
|
+
try {
|
|
29
|
+
const catalog = await loadModelsDevCatalog({
|
|
30
|
+
timeoutMs: PRICING_TIMEOUT_MS,
|
|
31
|
+
strict: true,
|
|
32
|
+
});
|
|
33
|
+
const url = new URL(request.url);
|
|
34
|
+
const providerFilter = url.searchParams.get('provider');
|
|
35
|
+
const modelId = url.searchParams.get('id');
|
|
36
|
+
|
|
37
|
+
if (modelId) {
|
|
38
|
+
const [providerSlug, ...rest] = modelId.split('/');
|
|
39
|
+
const provider = catalog[providerSlug] as Record<string, unknown> | undefined;
|
|
40
|
+
const models = (provider?.models ?? {}) as Record<string, CatalogModel>;
|
|
41
|
+
const wanted = rest.join('/');
|
|
42
|
+
const match = Object.entries(models).find(([key, model]) => key === wanted || model?.id === wanted);
|
|
43
|
+
return json({ found: match ? { provider: providerSlug, modelKey: match[0], ...match[1] } : null, isMock: false });
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const providers: Record<string, unknown> = {};
|
|
47
|
+
for (const [slug, value] of Object.entries(catalog)) {
|
|
48
|
+
if (providerFilter && slug !== providerFilter) continue;
|
|
49
|
+
if (typeof value !== 'object' || value === null) continue;
|
|
50
|
+
const record = value as Record<string, unknown>;
|
|
51
|
+
const models = record.models as Record<string, CatalogModel> | undefined;
|
|
52
|
+
if (!models || typeof models !== 'object') continue;
|
|
53
|
+
providers[slug] = Object.fromEntries(
|
|
54
|
+
Object.entries(models).map(([key, model]) => [key, {
|
|
55
|
+
name: model?.name ?? key,
|
|
56
|
+
cost: model?.cost ?? null,
|
|
57
|
+
limit: model?.limit ?? null,
|
|
58
|
+
}]),
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
return json({ providers, isMock: false });
|
|
62
|
+
} catch (error: any) {
|
|
63
|
+
return json({ providers: {}, isMock: false, error: error.message }, { status: 200 });
|
|
64
|
+
}
|
|
65
|
+
}
|