jishushell 0.4.17 → 0.4.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/Dockerfile.hermes-slim +193 -0
  2. package/apps/hermes-container.yaml +35 -0
  3. package/apps/ollama-binary.yaml +200 -0
  4. package/apps/ollama-cpu-container.yaml +37 -0
  5. package/apps/ollama-with-hollama-binary.yaml +195 -0
  6. package/apps/openclaw-binary.yaml +69 -0
  7. package/apps/openclaw-container.yaml +37 -0
  8. package/apps/openclaw-with-ollama-container.yaml +42 -0
  9. package/apps/openclaw-with-searxng-container.yaml +136 -0
  10. package/apps/openwebui-container.yaml +53 -0
  11. package/apps/playwright-container.yaml +120 -0
  12. package/apps/searxng-container.yaml +115 -0
  13. package/dist/auth.d.ts +1 -0
  14. package/dist/auth.js +15 -14
  15. package/dist/auth.js.map +1 -1
  16. package/dist/cli/app.d.ts +1 -0
  17. package/dist/cli/app.js +710 -52
  18. package/dist/cli/app.js.map +1 -1
  19. package/dist/cli/backup.d.ts +3 -0
  20. package/dist/cli/backup.js +434 -0
  21. package/dist/cli/backup.js.map +1 -0
  22. package/dist/cli/doctor.d.ts +1 -0
  23. package/dist/cli/doctor.js +61 -35
  24. package/dist/cli/doctor.js.map +1 -1
  25. package/dist/cli/job.d.ts +1 -0
  26. package/dist/cli/job.js +37 -99
  27. package/dist/cli/job.js.map +1 -1
  28. package/dist/cli/llm.d.ts +1 -0
  29. package/dist/cli/llm.js +20 -14
  30. package/dist/cli/llm.js.map +1 -1
  31. package/dist/cli/managed-list.d.ts +30 -0
  32. package/dist/cli/managed-list.js +129 -0
  33. package/dist/cli/managed-list.js.map +1 -0
  34. package/dist/cli/panel.d.ts +4 -3
  35. package/dist/cli/panel.js +94 -24
  36. package/dist/cli/panel.js.map +1 -1
  37. package/dist/cli/version.d.ts +1 -0
  38. package/dist/cli/version.js +12 -0
  39. package/dist/cli/version.js.map +1 -0
  40. package/dist/cli.js +47 -516
  41. package/dist/cli.js.map +1 -1
  42. package/dist/config.d.ts +68 -0
  43. package/dist/config.js +266 -12
  44. package/dist/config.js.map +1 -1
  45. package/dist/control.d.ts +10 -6
  46. package/dist/control.js +87 -6
  47. package/dist/control.js.map +1 -1
  48. package/dist/install.d.ts +16 -0
  49. package/dist/install.js +75 -26
  50. package/dist/install.js.map +1 -1
  51. package/dist/routes/agent-apps.d.ts +15 -0
  52. package/dist/routes/agent-apps.js +78 -0
  53. package/dist/routes/agent-apps.js.map +1 -0
  54. package/dist/routes/apps.js +186 -7
  55. package/dist/routes/apps.js.map +1 -1
  56. package/dist/routes/backup.js +3 -3
  57. package/dist/routes/backup.js.map +1 -1
  58. package/dist/routes/instances.d.ts +6 -0
  59. package/dist/routes/instances.js +862 -879
  60. package/dist/routes/instances.js.map +1 -1
  61. package/dist/routes/llm.js +9 -8
  62. package/dist/routes/llm.js.map +1 -1
  63. package/dist/routes/runtime.d.ts +15 -0
  64. package/dist/routes/runtime.js +69 -0
  65. package/dist/routes/runtime.js.map +1 -0
  66. package/dist/routes/setup.js +103 -8
  67. package/dist/routes/setup.js.map +1 -1
  68. package/dist/routes/system.js +25 -3
  69. package/dist/routes/system.js.map +1 -1
  70. package/dist/server.js +71 -7
  71. package/dist/server.js.map +1 -1
  72. package/dist/services/agent-apps/catalog.d.ts +30 -0
  73. package/dist/services/agent-apps/catalog.js +60 -0
  74. package/dist/services/agent-apps/catalog.js.map +1 -0
  75. package/dist/services/agent-apps/index.d.ts +36 -0
  76. package/dist/services/agent-apps/index.js +171 -0
  77. package/dist/services/agent-apps/index.js.map +1 -0
  78. package/dist/services/agent-apps/installers/adapter-probes.d.ts +49 -0
  79. package/dist/services/agent-apps/installers/adapter-probes.js +223 -0
  80. package/dist/services/agent-apps/installers/adapter-probes.js.map +1 -0
  81. package/dist/services/agent-apps/installers/adapter.d.ts +30 -0
  82. package/dist/services/agent-apps/installers/adapter.js +171 -0
  83. package/dist/services/agent-apps/installers/adapter.js.map +1 -0
  84. package/dist/services/agent-apps/installers/registry-probe.d.ts +38 -0
  85. package/dist/services/agent-apps/installers/registry-probe.js +183 -0
  86. package/dist/services/agent-apps/installers/registry-probe.js.map +1 -0
  87. package/dist/services/agent-apps/installers/shell-script.d.ts +47 -0
  88. package/dist/services/agent-apps/installers/shell-script.js +471 -0
  89. package/dist/services/agent-apps/installers/shell-script.js.map +1 -0
  90. package/dist/services/agent-apps/types.d.ts +125 -0
  91. package/dist/services/agent-apps/types.js +17 -0
  92. package/dist/services/agent-apps/types.js.map +1 -0
  93. package/dist/services/{app-compiler.d.ts → app/app-compiler.d.ts} +3 -3
  94. package/dist/services/{app-compiler.js → app/app-compiler.js} +10 -7
  95. package/dist/services/app/app-compiler.js.map +1 -0
  96. package/dist/services/app/app-manager.d.ts +142 -0
  97. package/dist/services/app/app-manager.js +1988 -0
  98. package/dist/services/app/app-manager.js.map +1 -0
  99. package/dist/services/app/custom-manager.d.ts +27 -0
  100. package/dist/services/app/custom-manager.js +285 -0
  101. package/dist/services/app/custom-manager.js.map +1 -0
  102. package/dist/services/app/hermes-agent-manager.d.ts +20 -0
  103. package/dist/services/app/hermes-agent-manager.js +289 -0
  104. package/dist/services/app/hermes-agent-manager.js.map +1 -0
  105. package/dist/services/app/id-normalizer.d.ts +27 -0
  106. package/dist/services/app/id-normalizer.js +77 -0
  107. package/dist/services/app/id-normalizer.js.map +1 -0
  108. package/dist/services/app/ollama-manager.d.ts +18 -0
  109. package/dist/services/app/ollama-manager.js +207 -0
  110. package/dist/services/app/ollama-manager.js.map +1 -0
  111. package/dist/services/app/openclaw-manager.d.ts +63 -0
  112. package/dist/services/app/openclaw-manager.js +1178 -0
  113. package/dist/services/app/openclaw-manager.js.map +1 -0
  114. package/dist/services/app/paths.d.ts +47 -0
  115. package/dist/services/app/paths.js +68 -0
  116. package/dist/services/app/paths.js.map +1 -0
  117. package/dist/services/app/registry.d.ts +17 -0
  118. package/dist/services/app/registry.js +31 -0
  119. package/dist/services/app/registry.js.map +1 -0
  120. package/dist/services/app/remote-spec.d.ts +14 -0
  121. package/dist/services/app/remote-spec.js +58 -0
  122. package/dist/services/app/remote-spec.js.map +1 -0
  123. package/dist/services/app/terminal-session-manager.d.ts +27 -0
  124. package/dist/services/app/terminal-session-manager.js +157 -0
  125. package/dist/services/app/terminal-session-manager.js.map +1 -0
  126. package/dist/services/app/types.d.ts +72 -0
  127. package/dist/services/app/types.js +16 -0
  128. package/dist/services/app/types.js.map +1 -0
  129. package/dist/services/backup-manager.js +60 -22
  130. package/dist/services/backup-manager.js.map +1 -1
  131. package/dist/services/instance-manager.d.ts +82 -39
  132. package/dist/services/instance-manager.js +575 -1142
  133. package/dist/services/instance-manager.js.map +1 -1
  134. package/dist/services/llm-proxy/circuit-breaker.js +10 -2
  135. package/dist/services/llm-proxy/circuit-breaker.js.map +1 -1
  136. package/dist/services/llm-proxy/index.d.ts +14 -1
  137. package/dist/services/llm-proxy/index.js +51 -6
  138. package/dist/services/llm-proxy/index.js.map +1 -1
  139. package/dist/services/nomad-manager.d.ts +260 -3
  140. package/dist/services/nomad-manager.js +2866 -449
  141. package/dist/services/nomad-manager.js.map +1 -1
  142. package/dist/services/panel-manager.d.ts +10 -0
  143. package/dist/services/panel-manager.js +97 -0
  144. package/dist/services/panel-manager.js.map +1 -1
  145. package/dist/services/plugin-installer.js +28 -2
  146. package/dist/services/plugin-installer.js.map +1 -1
  147. package/dist/services/process-manager.js +22 -0
  148. package/dist/services/process-manager.js.map +1 -1
  149. package/dist/services/runtime/adapters/custom.d.ts +20 -0
  150. package/dist/services/runtime/adapters/custom.js +90 -0
  151. package/dist/services/runtime/adapters/custom.js.map +1 -0
  152. package/dist/services/runtime/adapters/hermes.d.ts +174 -0
  153. package/dist/services/runtime/adapters/hermes.js +1316 -0
  154. package/dist/services/runtime/adapters/hermes.js.map +1 -0
  155. package/dist/services/runtime/adapters/openclaw-routes.d.ts +17 -0
  156. package/dist/services/runtime/adapters/openclaw-routes.js +946 -0
  157. package/dist/services/runtime/adapters/openclaw-routes.js.map +1 -0
  158. package/dist/services/runtime/adapters/openclaw.d.ts +188 -0
  159. package/dist/services/runtime/adapters/openclaw.js +2195 -0
  160. package/dist/services/runtime/adapters/openclaw.js.map +1 -0
  161. package/dist/services/runtime/errors.d.ts +28 -0
  162. package/dist/services/runtime/errors.js +31 -0
  163. package/dist/services/runtime/errors.js.map +1 -0
  164. package/dist/services/runtime/index.d.ts +34 -0
  165. package/dist/services/runtime/index.js +51 -0
  166. package/dist/services/runtime/index.js.map +1 -0
  167. package/dist/services/runtime/instance.d.ts +24 -0
  168. package/dist/services/runtime/instance.js +143 -0
  169. package/dist/services/runtime/instance.js.map +1 -0
  170. package/dist/services/runtime/migrations.d.ts +15 -0
  171. package/dist/services/runtime/migrations.js +25 -0
  172. package/dist/services/runtime/migrations.js.map +1 -0
  173. package/dist/services/runtime/registry.d.ts +13 -0
  174. package/dist/services/runtime/registry.js +32 -0
  175. package/dist/services/runtime/registry.js.map +1 -0
  176. package/dist/services/runtime/types.d.ts +545 -0
  177. package/dist/services/runtime/types.js +14 -0
  178. package/dist/services/runtime/types.js.map +1 -0
  179. package/dist/services/setup-manager.d.ts +70 -29
  180. package/dist/services/setup-manager.js +278 -597
  181. package/dist/services/setup-manager.js.map +1 -1
  182. package/dist/services/task-registry.d.ts +44 -0
  183. package/dist/services/task-registry.js +74 -0
  184. package/dist/services/task-registry.js.map +1 -0
  185. package/dist/services/telemetry/heartbeat.d.ts +6 -6
  186. package/dist/services/telemetry/heartbeat.js +29 -30
  187. package/dist/services/telemetry/heartbeat.js.map +1 -1
  188. package/dist/types.d.ts +162 -2
  189. package/dist/utils/docker-host.d.ts +15 -0
  190. package/dist/utils/docker-host.js +64 -0
  191. package/dist/utils/docker-host.js.map +1 -0
  192. package/install/jishu-install.sh +25 -1
  193. package/package.json +14 -4
  194. package/public/assets/Dashboard-B-JoOjBQ.js +1 -0
  195. package/public/assets/HermesChatPanel-mFSureyc.js +1 -0
  196. package/public/assets/HermesConfigForm-DvR05LK1.js +4 -0
  197. package/public/assets/InitPassword-CVA8wQA6.js +1 -0
  198. package/public/assets/InstanceDetail-DcZW2QGO.js +91 -0
  199. package/public/assets/{Login-D1Bt-Lyk.js → Login-BWsZH2mu.js} +1 -1
  200. package/public/assets/NewInstance-BCIrAd86.js +1 -0
  201. package/public/assets/Settings-xkDcduFz.js +1 -0
  202. package/public/assets/Setup-Cfuwj4gV.js +1 -0
  203. package/public/assets/WeixinLoginPanel-CnjR8xMu.js +9 -0
  204. package/public/assets/index-CPhVFEsx.css +1 -0
  205. package/public/assets/index-DQsM6Joa.js +19 -0
  206. package/public/assets/input-paste-CrNVAyOy.js +1 -0
  207. package/public/assets/registry-B4UFJdpA.js +2 -0
  208. package/public/assets/{usePolling-CK0DfI4h.js → usePolling-Do5Erqm_.js} +1 -1
  209. package/public/assets/vendor-i18n-ucpM0OR0.js +9 -0
  210. package/public/assets/{vendor-react-B1-3Yrt-.js → vendor-react-Bk1hRGiY.js} +1 -1
  211. package/public/favicon.png +0 -0
  212. package/public/index.html +9 -4
  213. package/public/logos/hermes.png +0 -0
  214. package/public/logos/ollama.png +0 -0
  215. package/public/logos/openclaw.svg +60 -0
  216. package/scripts/build-hermes-image.sh +21 -0
  217. package/scripts/build-local.sh +54 -0
  218. package/scripts/check-adapter-isolation.ts +293 -0
  219. package/scripts/fixtures/instances/hermes-sample/instance.json +37 -0
  220. package/scripts/fixtures/instances/legacy-openclaw-sample/instance.json +7 -0
  221. package/scripts/smoke/hermes-bootstrap.sh +195 -0
  222. package/templates/hermes-entrypoint.sh +154 -0
  223. package/dist/cli/openclaw.d.ts +0 -12
  224. package/dist/cli/openclaw.js +0 -156
  225. package/dist/cli/openclaw.js.map +0 -1
  226. package/dist/services/app-compiler.js.map +0 -1
  227. package/dist/services/app-manager.d.ts +0 -17
  228. package/dist/services/app-manager.js +0 -168
  229. package/dist/services/app-manager.js.map +0 -1
  230. package/dist/services/job-manager.d.ts +0 -22
  231. package/dist/services/job-manager.js +0 -102
  232. package/dist/services/job-manager.js.map +0 -1
  233. package/public/assets/Dashboard-CQsp1Mr9.js +0 -1
  234. package/public/assets/InitPassword-BEC8SE4A.js +0 -1
  235. package/public/assets/InstanceDetail-B5wTgNEg.js +0 -17
  236. package/public/assets/NewInstance-GQzm3K9D.js +0 -1
  237. package/public/assets/Settings-ByjGlqhP.js +0 -1
  238. package/public/assets/Setup-cMF21Y-8.js +0 -1
  239. package/public/assets/index-B6qQP4mH.css +0 -1
  240. package/public/assets/index-BuTQtuNy.js +0 -16
  241. package/public/assets/vendor-i18n-CfW0RvgE.js +0 -9
@@ -56,4 +56,4 @@ Error generating stack: `+u.message+`
56
56
  * LICENSE.md file in the root directory of this source tree.
57
57
  *
58
58
  * @license MIT
59
- */function Zu(){return Zu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zu.apply(this,arguments)}function bp(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,u;for(u=0;u<r.length;u++)l=r[u],!(t.indexOf(l)>=0)&&(n[l]=e[l]);return n}function eh(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function th(e,t){return e.button===0&&(!t||t==="_self")&&!eh(e)}function Ju(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(l=>[n,l]):[[n,r]])},[]))}function nh(e,t){let n=Ju(e);return t&&t.forEach((r,l)=>{n.has(l)||t.getAll(l).forEach(u=>{n.append(l,u)})}),n}const rh=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],lh="6";try{window.__reactRouterVersion=lh}catch{}const uh="startTransition",ha=tf[uh];function ph(e){let{basename:t,children:n,future:r,window:l}=e,u=E.useRef();u.current==null&&(u.current=op({window:l,v5Compat:!0}));let i=u.current,[o,a]=E.useState({action:i.action,location:i.location}),{v7_startTransition:s}=r||{},h=E.useCallback(p=>{s&&ha?ha(()=>a(p)):a(p)},[a,s]);return E.useLayoutEffect(()=>i.listen(h),[i,h]),E.useEffect(()=>Zp(r),[r]),E.createElement(qp,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:i,future:r})}const ih=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",oh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hh=E.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:u,replace:i,state:o,target:a,to:s,preventScrollReset:h,viewTransition:p}=t,m=bp(t,rh),{basename:y}=E.useContext(wt),g,w=!1;if(typeof s=="string"&&oh.test(s)&&(g=s,ih))try{let d=new URL(window.location.href),v=s.startsWith("//")?new URL(d.protocol+s):new URL(s),k=Yi(v.pathname,y);v.origin===d.origin&&k!=null?s=k+v.search+v.hash:w=!0}catch{}let C=Fp(s,{relative:l}),f=ah(s,{replace:i,state:o,target:a,preventScrollReset:h,relative:l,viewTransition:p});function c(d){r&&r(d),d.defaultPrevented||f(d)}return E.createElement("a",Zu({},m,{href:g||C,onClick:w||u?r:c,ref:n,target:a}))});var ma;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ma||(ma={}));var va;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(va||(va={}));function ah(e,t){let{target:n,replace:r,state:l,preventScrollReset:u,relative:i,viewTransition:o}=t===void 0?{}:t,a=Ji(),s=hn(),h=Oc(e,{relative:i});return E.useCallback(p=>{if(th(p,n)){p.preventDefault();let m=r!==void 0?r:sl(s)===sl(h);a(e,{replace:m,state:l,preventScrollReset:u,relative:i,viewTransition:o})}},[s,a,h,r,l,n,e,u,i,o])}function mh(e){let t=E.useRef(Ju(e)),n=E.useRef(!1),r=hn(),l=E.useMemo(()=>nh(r.search,n.current?null:t.current),[r.search]),u=Ji(),i=E.useCallback((o,a)=>{const s=Ju(typeof o=="function"?o(l):o);n.current=!0,u("?"+s,a)},[u,l]);return[l,i]}export{ph as B,hh as L,fh as N,dh as R,sh as a,hn as b,Jp as c,ch as d,ef as e,mh as f,E as r,Ji as u};
59
+ */function Zu(){return Zu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zu.apply(this,arguments)}function bp(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,u;for(u=0;u<r.length;u++)l=r[u],!(t.indexOf(l)>=0)&&(n[l]=e[l]);return n}function eh(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function th(e,t){return e.button===0&&(!t||t==="_self")&&!eh(e)}function Ju(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(l=>[n,l]):[[n,r]])},[]))}function nh(e,t){let n=Ju(e);return t&&t.forEach((r,l)=>{n.has(l)||t.getAll(l).forEach(u=>{n.append(l,u)})}),n}const rh=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],lh="6";try{window.__reactRouterVersion=lh}catch{}const uh="startTransition",ha=tf[uh];function ph(e){let{basename:t,children:n,future:r,window:l}=e,u=E.useRef();u.current==null&&(u.current=op({window:l,v5Compat:!0}));let i=u.current,[o,a]=E.useState({action:i.action,location:i.location}),{v7_startTransition:s}=r||{},h=E.useCallback(p=>{s&&ha?ha(()=>a(p)):a(p)},[a,s]);return E.useLayoutEffect(()=>i.listen(h),[i,h]),E.useEffect(()=>Zp(r),[r]),E.createElement(qp,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:i,future:r})}const ih=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",oh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hh=E.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:u,replace:i,state:o,target:a,to:s,preventScrollReset:h,viewTransition:p}=t,m=bp(t,rh),{basename:y}=E.useContext(wt),g,w=!1;if(typeof s=="string"&&oh.test(s)&&(g=s,ih))try{let d=new URL(window.location.href),v=s.startsWith("//")?new URL(d.protocol+s):new URL(s),k=Yi(v.pathname,y);v.origin===d.origin&&k!=null?s=k+v.search+v.hash:w=!0}catch{}let C=Fp(s,{relative:l}),f=ah(s,{replace:i,state:o,target:a,preventScrollReset:h,relative:l,viewTransition:p});function c(d){r&&r(d),d.defaultPrevented||f(d)}return E.createElement("a",Zu({},m,{href:g||C,onClick:w||u?r:c,ref:n,target:a}))});var ma;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ma||(ma={}));var va;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(va||(va={}));function ah(e,t){let{target:n,replace:r,state:l,preventScrollReset:u,relative:i,viewTransition:o}=t===void 0?{}:t,a=Ji(),s=hn(),h=Oc(e,{relative:i});return E.useCallback(p=>{if(th(p,n)){p.preventDefault();let m=r!==void 0?r:sl(s)===sl(h);a(e,{replace:m,state:l,preventScrollReset:u,relative:i,viewTransition:o})}},[s,a,h,r,l,n,e,u,i,o])}function mh(e){let t=E.useRef(Ju(e)),n=E.useRef(!1),r=hn(),l=E.useMemo(()=>nh(r.search,n.current?null:t.current),[r.search]),u=Ji(),i=E.useCallback((o,a)=>{const s=Ju(typeof o=="function"?o(l):o);n.current=!0,u("?"+s,a)},[u,l]);return[l,i]}export{ph as B,hh as L,fh as N,dh as R,sh as a,hn as b,Jp as c,ch as d,ef as e,mh as f,jc as g,E as r,Ji as u};
Binary file
package/public/index.html CHANGED
@@ -3,11 +3,16 @@
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <!-- Without an explicit favicon, requests to /favicon.ico hit the SPA
7
+ fallback (returns index.html), and Chrome then picks the largest
8
+ already-loaded image as the tab icon — typically /logos/hermes.png
9
+ from the instance cards, making the panel look like Hermes. -->
10
+ <link rel="icon" type="image/png" href="/favicon.png" />
6
11
  <title>JishuShell</title>
7
- <script type="module" crossorigin src="/assets/index-BuTQtuNy.js"></script>
8
- <link rel="modulepreload" crossorigin href="/assets/vendor-react-B1-3Yrt-.js">
9
- <link rel="modulepreload" crossorigin href="/assets/vendor-i18n-CfW0RvgE.js">
10
- <link rel="stylesheet" crossorigin href="/assets/index-B6qQP4mH.css">
12
+ <script type="module" crossorigin src="/assets/index-DQsM6Joa.js"></script>
13
+ <link rel="modulepreload" crossorigin href="/assets/vendor-react-Bk1hRGiY.js">
14
+ <link rel="modulepreload" crossorigin href="/assets/vendor-i18n-ucpM0OR0.js">
15
+ <link rel="stylesheet" crossorigin href="/assets/index-CPhVFEsx.css">
11
16
  </head>
12
17
  <body class="bg-white min-h-screen">
13
18
  <div id="root"></div>
Binary file
Binary file
@@ -0,0 +1,60 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 16 16" role="img" aria-label="Pixel lobster">
2
+ <rect width="16" height="16" fill="none"/>
3
+ <!-- outline -->
4
+ <g fill="#3a0a0d">
5
+ <rect x="1" y="5" width="1" height="3"/>
6
+ <rect x="2" y="4" width="1" height="1"/>
7
+ <rect x="2" y="8" width="1" height="1"/>
8
+ <rect x="3" y="3" width="1" height="1"/>
9
+ <rect x="3" y="9" width="1" height="1"/>
10
+ <rect x="4" y="2" width="1" height="1"/>
11
+ <rect x="4" y="10" width="1" height="1"/>
12
+ <rect x="5" y="2" width="6" height="1"/>
13
+ <rect x="11" y="2" width="1" height="1"/>
14
+ <rect x="12" y="3" width="1" height="1"/>
15
+ <rect x="12" y="9" width="1" height="1"/>
16
+ <rect x="13" y="4" width="1" height="1"/>
17
+ <rect x="13" y="8" width="1" height="1"/>
18
+ <rect x="14" y="5" width="1" height="3"/>
19
+ <rect x="5" y="11" width="6" height="1"/>
20
+ <rect x="4" y="12" width="1" height="1"/>
21
+ <rect x="11" y="12" width="1" height="1"/>
22
+ <rect x="3" y="13" width="1" height="1"/>
23
+ <rect x="12" y="13" width="1" height="1"/>
24
+ <rect x="5" y="14" width="6" height="1"/>
25
+ </g>
26
+
27
+ <!-- body -->
28
+ <g fill="#ff4f40">
29
+ <rect x="5" y="3" width="6" height="1"/>
30
+ <rect x="4" y="4" width="8" height="1"/>
31
+ <rect x="3" y="5" width="10" height="1"/>
32
+ <rect x="3" y="6" width="10" height="1"/>
33
+ <rect x="3" y="7" width="10" height="1"/>
34
+ <rect x="4" y="8" width="8" height="1"/>
35
+ <rect x="5" y="9" width="6" height="1"/>
36
+ <rect x="5" y="12" width="6" height="1"/>
37
+ <rect x="6" y="13" width="4" height="1"/>
38
+ </g>
39
+
40
+ <!-- claws -->
41
+ <g fill="#ff775f">
42
+ <rect x="1" y="6" width="2" height="1"/>
43
+ <rect x="2" y="5" width="1" height="1"/>
44
+ <rect x="2" y="7" width="1" height="1"/>
45
+ <rect x="13" y="6" width="2" height="1"/>
46
+ <rect x="13" y="5" width="1" height="1"/>
47
+ <rect x="13" y="7" width="1" height="1"/>
48
+ </g>
49
+
50
+ <!-- eyes -->
51
+ <g fill="#081016">
52
+ <rect x="6" y="5" width="1" height="1"/>
53
+ <rect x="9" y="5" width="1" height="1"/>
54
+ </g>
55
+ <g fill="#f5fbff">
56
+ <rect x="6" y="4" width="1" height="1"/>
57
+ <rect x="9" y="4" width="1" height="1"/>
58
+ </g>
59
+ </svg>
60
+
@@ -0,0 +1,21 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+
4
+ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
5
+ PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
6
+
7
+ IMAGE_NAME="${HERMES_IMAGE:-ghcr.io/x-aijishu/hermes-runtime}"
8
+ IMAGE_TAG="${HERMES_TAG:-local}"
9
+ HERMES_REF="${HERMES_REF:-main}"
10
+
11
+ echo "Building ${IMAGE_NAME}:${IMAGE_TAG} from Hermes ref ${HERMES_REF} ..."
12
+ docker build \
13
+ --network=host \
14
+ --build-arg "HERMES_REF=${HERMES_REF}" \
15
+ -f "${PROJECT_ROOT}/Dockerfile.hermes-slim" \
16
+ -t "${IMAGE_NAME}:${IMAGE_TAG}" \
17
+ "${PROJECT_ROOT}"
18
+
19
+ echo
20
+ echo "Done: ${IMAGE_NAME}:${IMAGE_TAG}"
21
+ docker image inspect "${IMAGE_NAME}:${IMAGE_TAG}" --format '{{.Id}}'
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env bash
2
+ # scripts/build-local.sh — Build Docker images locally for development/testing.
3
+ # Usage:
4
+ # ./scripts/build-local.sh openclaw # Build OpenClaw runtime image
5
+ # ./scripts/build-local.sh hermes # Build Hermes Agent + Open WebUI image
6
+ # ./scripts/build-local.sh all # Build all images
7
+ # PLATFORM=linux/arm64 ./scripts/build-local.sh openclaw # Build for specific platform
8
+ set -euo pipefail
9
+ cd "$(dirname "$0")/.."
10
+
11
+ PLATFORM="${PLATFORM:-linux/$(dpkg --print-architecture 2>/dev/null || uname -m)}"
12
+
13
+ build_openclaw() {
14
+ local version="${OPENCLAW_VERSION:-latest}"
15
+ echo "==> Building OpenClaw runtime image (version=${version}, platform=${PLATFORM})"
16
+ docker build \
17
+ -f Dockerfile.openclaw-slim \
18
+ --build-arg "OPENCLAW_VERSION=${version}" \
19
+ --platform "${PLATFORM}" \
20
+ -t "jishushell-openclaw:${version}" \
21
+ -t "jishushell-openclaw:latest" \
22
+ .
23
+ echo "==> Done: jishushell-openclaw:${version}"
24
+ }
25
+
26
+ build_hermes() {
27
+ local hermes_ver="${HERMES_VERSION:-latest}"
28
+ local webui_ver="${OPEN_WEBUI_VERSION:-latest}"
29
+ echo "==> Building Hermes Agent + Open WebUI image (hermes=${hermes_ver}, webui=${webui_ver}, platform=${PLATFORM})"
30
+ docker build \
31
+ -f Dockerfile.hermes-agent \
32
+ --build-arg "HERMES_VERSION=${hermes_ver}" \
33
+ --build-arg "OPEN_WEBUI_VERSION=${webui_ver}" \
34
+ --platform "${PLATFORM}" \
35
+ -t "jishushell-hermes:${hermes_ver}" \
36
+ -t "jishushell-hermes:latest" \
37
+ .
38
+ echo "==> Done: jishushell-hermes:${hermes_ver}"
39
+ }
40
+
41
+ case "${1:-all}" in
42
+ openclaw) build_openclaw ;;
43
+ hermes) build_hermes ;;
44
+ all) build_openclaw; build_hermes ;;
45
+ *)
46
+ echo "Usage: $0 {openclaw|hermes|all}"
47
+ echo "Environment variables:"
48
+ echo " PLATFORM Target platform (default: auto-detect)"
49
+ echo " OPENCLAW_VERSION OpenClaw version (default: latest)"
50
+ echo " HERMES_VERSION Hermes Agent version (default: latest)"
51
+ echo " OPEN_WEBUI_VERSION Open WebUI version (default: latest)"
52
+ exit 1
53
+ ;;
54
+ esac
@@ -0,0 +1,293 @@
1
+ #!/usr/bin/env -S node --experimental-strip-types
2
+ /**
3
+ * check-adapter-isolation — §32.2.1 static enforcement + §30.3 fixtures.
4
+ *
5
+ * Two invariants:
6
+ *
7
+ * 1. Core framework files never import from
8
+ * `src/services/runtime/adapters/*`. Adapters load exclusively through
9
+ * `src/services/runtime/index.ts` side-effect imports, and framework
10
+ * code reaches adapters through `getAdapter(kind)` only.
11
+ *
12
+ * 2. Fixture `instance.json` samples under
13
+ * `scripts/fixtures/instances/<name>/` satisfy the minimum meta
14
+ * contract: `id`, `name`, resolvable agent discriminator, and
15
+ * (for Hermes) the required `paths.agentHome` / `paths.primaryConfig`
16
+ * / `paths.secretEnv` entries. Legacy openclaw samples round-trip
17
+ * through `backfillInstanceMeta` to `agentType="openclaw"`.
18
+ *
19
+ * Run via `npm run check:contracts`. Exits non-zero on violation.
20
+ */
21
+
22
+ import { readFileSync, readdirSync, statSync } from "node:fs";
23
+ import { resolve } from "node:path";
24
+
25
+ const REPO_ROOT = resolve(import.meta.dirname ?? ".", "..");
26
+
27
+ /**
28
+ * Files that must not import any specific adapter directly. Matches the
29
+ * list in docs/multi-agent-runtime-generalization-plan.md §32.2.1.
30
+ */
31
+ const CORE_FILES = [
32
+ "src/services/instance-manager.ts",
33
+ "src/services/nomad-manager.ts",
34
+ "src/services/setup-manager.ts",
35
+ "src/services/backup-manager.ts",
36
+ "src/services/llm-proxy/index.ts",
37
+ "src/routes/instances.ts",
38
+ "src/routes/setup.ts",
39
+ "src/server.ts",
40
+ ] as const;
41
+
42
+ /**
43
+ * Regexes for forbidden adapter imports. Covers both static imports and
44
+ * dynamic `import()`. Note: we deliberately allow references to the
45
+ * registry / runtime/index (`./runtime/index.js`, `./runtime/registry.js`,
46
+ * `./runtime/types.js`, `./runtime/instance.js`) because those contain
47
+ * the framework surface, not adapter-specific logic.
48
+ */
49
+ const FORBIDDEN_IMPORT_PATTERNS = [
50
+ /from\s+["'][^"']*\/runtime\/adapters\/[^"']+["']/g,
51
+ /import\s*\(\s*["'][^"']*\/runtime\/adapters\/[^"']+["']\s*\)/g,
52
+ ];
53
+
54
+ /**
55
+ * Literal strings that indicate kind-specific bleed-through into
56
+ * framework files. These are advisory only for now: existing OpenClaw
57
+ * legacy code may still contain OPENCLAW_HOME env references etc. We log
58
+ * them but don't fail the build — the physical migration cleans them up
59
+ * in a follow-up PR. When MIGRATION_STRICT=1 is set, they become errors.
60
+ */
61
+ const KIND_LITERAL_PATTERNS: Array<{ pattern: RegExp; description: string }> = [
62
+ {
63
+ pattern: /JOB_PREFIX\s*=\s*["']openclaw-/,
64
+ description: `JOB_PREFIX literal "openclaw-" — §32.2.7 wants panel.nomadJobPrefix`,
65
+ },
66
+ {
67
+ pattern: /OPENCLAW_HOME|OPENCLAW_INSTANCE_ID|OPENCLAW_GATEWAY_PORT/,
68
+ description: `OpenClaw-specific env var literal — should live in OpenClawAdapter`,
69
+ },
70
+ {
71
+ pattern: /isHermesInstance\s*\(/,
72
+ description: `isHermesInstance() — runtime-specific branch, should dispatch via getAdapter`,
73
+ },
74
+ {
75
+ pattern: /agentType\s*===\s*["']hermes["']|agentType\s*===\s*["']openclaw["']/,
76
+ description: `agentType literal comparison — dispatch through adapter instead`,
77
+ },
78
+ ];
79
+
80
+ const STRICT = process.env.MIGRATION_STRICT === "1";
81
+
82
+ type Violation = {
83
+ file: string;
84
+ line: number;
85
+ column: number;
86
+ text: string;
87
+ rule: string;
88
+ };
89
+
90
+ function isCommentLine(lineText: string): boolean {
91
+ const t = lineText.trimStart();
92
+ return t.startsWith("//") || t.startsWith("*") || t.startsWith("/*");
93
+ }
94
+
95
+ function findViolations(filepath: string, content: string): Violation[] {
96
+ const violations: Violation[] = [];
97
+
98
+ // 1. Forbidden adapter imports (HARD errors)
99
+ for (const pattern of FORBIDDEN_IMPORT_PATTERNS) {
100
+ let match: RegExpExecArray | null;
101
+ const re = new RegExp(pattern.source, "g");
102
+ while ((match = re.exec(content)) !== null) {
103
+ const before = content.slice(0, match.index);
104
+ const line = before.split("\n").length;
105
+ const column = match.index - before.lastIndexOf("\n");
106
+ violations.push({
107
+ file: filepath,
108
+ line,
109
+ column,
110
+ text: match[0],
111
+ rule: "adapter-import-forbidden",
112
+ });
113
+ }
114
+ }
115
+
116
+ // 2. Kind-specific literals (SOFT warnings unless MIGRATION_STRICT=1).
117
+ // Comment lines are skipped — references in docstrings or `§32`
118
+ // migration notes are not actual code bleed-through.
119
+ if (STRICT) {
120
+ const lines = content.split("\n");
121
+ for (let i = 0; i < lines.length; i++) {
122
+ const lineText = lines[i];
123
+ if (isCommentLine(lineText)) continue;
124
+ for (const { pattern, description } of KIND_LITERAL_PATTERNS) {
125
+ if (pattern.test(lineText)) {
126
+ violations.push({
127
+ file: filepath,
128
+ line: i + 1,
129
+ column: 1,
130
+ text: lineText.trim().slice(0, 120),
131
+ rule: `kind-literal: ${description}`,
132
+ });
133
+ }
134
+ }
135
+ }
136
+ }
137
+
138
+ return violations;
139
+ }
140
+
141
+ // ── Fixture schema checks (plan §30.3) ───────────────────────────────
142
+ //
143
+ // Keep the schema rules inline: we only validate a handful of fields and
144
+ // pulling in ajv for a single static script adds disproportionate churn.
145
+ // The check mirrors the runtime contract in `runtime/migrations.ts`:
146
+ // - every meta must carry `id` / `name`
147
+ // - `agentType` resolves (missing → defaults to "openclaw")
148
+ // - Hermes fixtures must declare `paths.agentHome` + `paths.primaryConfig`
149
+ // - legacy openclaw fixtures must backfill to `agentType === "openclaw"`
150
+
151
+ type FixtureViolation = { fixture: string; rule: string; detail: string };
152
+
153
+ function resolveFixtureAgentType(meta: Record<string, unknown>): string {
154
+ const raw = typeof meta.agentType === "string" ? meta.agentType : "";
155
+ return raw.trim() ? raw.trim() : "openclaw";
156
+ }
157
+
158
+ function checkFixture(fixtureName: string, meta: Record<string, unknown>): FixtureViolation[] {
159
+ const out: FixtureViolation[] = [];
160
+ const agentType = resolveFixtureAgentType(meta);
161
+ if (typeof meta.id !== "string" || !meta.id) {
162
+ out.push({ fixture: fixtureName, rule: "missing-id", detail: "instance.json must carry a non-empty string id" });
163
+ }
164
+ if (typeof meta.name !== "string" || !meta.name) {
165
+ out.push({ fixture: fixtureName, rule: "missing-name", detail: "instance.json must carry a non-empty string name" });
166
+ }
167
+ if (agentType === "hermes") {
168
+ const paths = (meta.paths ?? {}) as Record<string, unknown>;
169
+ for (const key of ["agentHome", "primaryConfig", "secretEnv"] as const) {
170
+ if (typeof paths[key] !== "string" || !paths[key]) {
171
+ out.push({
172
+ fixture: fixtureName,
173
+ rule: `hermes-paths-${key}`,
174
+ detail: `hermes instance.json requires paths.${key}`,
175
+ });
176
+ }
177
+ }
178
+ }
179
+ if (fixtureName.startsWith("legacy-openclaw") && agentType !== "openclaw") {
180
+ out.push({
181
+ fixture: fixtureName,
182
+ rule: "legacy-backfill",
183
+ detail: `legacy fixture must backfill to agentType="openclaw", got "${agentType}"`,
184
+ });
185
+ }
186
+ return out;
187
+ }
188
+
189
+ function loadFixtures(): FixtureViolation[] {
190
+ const fixturesRoot = resolve(REPO_ROOT, "scripts/fixtures/instances");
191
+ let entries: string[];
192
+ try {
193
+ entries = readdirSync(fixturesRoot);
194
+ } catch {
195
+ return []; // directory optional during early migrations
196
+ }
197
+ const violations: FixtureViolation[] = [];
198
+ for (const entry of entries) {
199
+ const fullPath = resolve(fixturesRoot, entry);
200
+ try {
201
+ if (!statSync(fullPath).isDirectory()) continue;
202
+ } catch {
203
+ continue;
204
+ }
205
+ const metaPath = resolve(fullPath, "instance.json");
206
+ let raw: string;
207
+ try {
208
+ raw = readFileSync(metaPath, "utf-8");
209
+ } catch {
210
+ violations.push({ fixture: entry, rule: "missing-instance-json", detail: metaPath });
211
+ continue;
212
+ }
213
+ try {
214
+ const meta = JSON.parse(raw) as Record<string, unknown>;
215
+ violations.push(...checkFixture(entry, meta));
216
+ } catch (e: any) {
217
+ violations.push({ fixture: entry, rule: "invalid-json", detail: e?.message ?? String(e) });
218
+ }
219
+ }
220
+ return violations;
221
+ }
222
+
223
+ function main(): void {
224
+ const allViolations: Violation[] = [];
225
+ const softFindings: Array<{ file: string; line: number; text: string; description: string }> = [];
226
+
227
+ for (const relPath of CORE_FILES) {
228
+ const abs = resolve(REPO_ROOT, relPath);
229
+ let content: string;
230
+ try {
231
+ content = readFileSync(abs, "utf-8");
232
+ } catch {
233
+ console.warn(`[check-adapter-isolation] skip (not found): ${relPath}`);
234
+ continue;
235
+ }
236
+ allViolations.push(...findViolations(relPath, content));
237
+
238
+ // Collect soft findings separately so non-strict runs can still report them.
239
+ if (!STRICT) {
240
+ const lines = content.split("\n");
241
+ for (let i = 0; i < lines.length; i++) {
242
+ const lineText = lines[i];
243
+ if (isCommentLine(lineText)) continue;
244
+ for (const { pattern, description } of KIND_LITERAL_PATTERNS) {
245
+ if (pattern.test(lineText)) {
246
+ softFindings.push({
247
+ file: relPath,
248
+ line: i + 1,
249
+ text: lineText.trim().slice(0, 120),
250
+ description,
251
+ });
252
+ }
253
+ }
254
+ }
255
+ }
256
+ }
257
+
258
+ const fixtureViolations = loadFixtures();
259
+
260
+ if (allViolations.length === 0 && softFindings.length === 0 && fixtureViolations.length === 0) {
261
+ console.log("[check-adapter-isolation] OK — core files are fully decoupled from specific adapters");
262
+ process.exit(0);
263
+ }
264
+
265
+ if (allViolations.length > 0) {
266
+ console.error(`\n[check-adapter-isolation] ${allViolations.length} HARD violation(s):\n`);
267
+ for (const v of allViolations) {
268
+ console.error(` ${v.file}:${v.line}:${v.column} [${v.rule}]`);
269
+ console.error(` ${v.text}`);
270
+ }
271
+ }
272
+
273
+ if (fixtureViolations.length > 0) {
274
+ console.error(`\n[check-adapter-isolation] ${fixtureViolations.length} fixture violation(s):\n`);
275
+ for (const v of fixtureViolations) {
276
+ console.error(` fixtures/${v.fixture} [${v.rule}] ${v.detail}`);
277
+ }
278
+ }
279
+
280
+ if (softFindings.length > 0) {
281
+ console.warn(
282
+ `\n[check-adapter-isolation] ${softFindings.length} soft finding(s) (remaining framework bleed-through — migrate in follow-up PRs; run with MIGRATION_STRICT=1 to fail on these):\n`,
283
+ );
284
+ for (const f of softFindings) {
285
+ console.warn(` ${f.file}:${f.line} ${f.description}`);
286
+ console.warn(` ${f.text}`);
287
+ }
288
+ }
289
+
290
+ process.exit(allViolations.length > 0 || fixtureViolations.length > 0 ? 1 : 0);
291
+ }
292
+
293
+ main();
@@ -0,0 +1,37 @@
1
+ {
2
+ "id": "hermes-sample",
3
+ "name": "Hermes Sample",
4
+ "description": "Fixture for plan §30.3 contract check",
5
+ "agentType": "hermes",
6
+ "paths": {
7
+ "instanceDir": "/tmp/instances/hermes-sample",
8
+ "agentHome": "/tmp/instances/hermes-sample/agent-home",
9
+ "primaryConfig": "/tmp/instances/hermes-sample/agent-home/config.yaml",
10
+ "secretEnv": "/tmp/instances/hermes-sample/agent-home/.env"
11
+ },
12
+ "runtime": {
13
+ "driver": "docker",
14
+ "image": "ghcr.io/x-aijishu/hermes-runtime:latest",
15
+ "envFiles": ["/tmp/instances/hermes-sample/agent-home/.env"],
16
+ "ports": [
17
+ { "name": "gateway", "containerPort": 8642, "hostPort": 8642 }
18
+ ]
19
+ },
20
+ "x-jishushell": {
21
+ "proxy": {
22
+ "upstream": {
23
+ "providerId": "openai",
24
+ "baseUrl": "https://api.openai.com",
25
+ "api": "openai-completions",
26
+ "authHeader": false,
27
+ "headers": {},
28
+ "models": [{ "id": "gpt-4o-mini", "name": "gpt-4o-mini", "contextWindow": 128000 }],
29
+ "selectedModelId": "gpt-4o-mini",
30
+ "apiKey": "",
31
+ "hasApiKey": false,
32
+ "clearApiKey": false
33
+ }
34
+ }
35
+ },
36
+ "created_at": "2026-04-20T00:00:00.000Z"
37
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "id": "legacy-openclaw-sample",
3
+ "name": "Legacy OpenClaw",
4
+ "description": "Pre-§32.2 instance: no agentType, only openclaw_home. Must backfill to agentType=openclaw.",
5
+ "openclaw_home": "/tmp/instances/legacy-openclaw-sample/openclaw-home",
6
+ "created_at": "2025-11-01T00:00:00.000Z"
7
+ }