agentgui 1.0.431 → 1.0.432

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.431",
3
+ "version": "1.0.432",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
package/server.js CHANGED
@@ -899,21 +899,24 @@ function acceptsEncoding(req, encoding) {
899
899
 
900
900
  function compressAndSend(req, res, statusCode, contentType, body) {
901
901
  const raw = typeof body === 'string' ? Buffer.from(body) : body;
902
+ const isHtml = contentType && contentType.includes('text/html');
903
+ const baseHeaders = { 'Content-Type': contentType };
904
+ if (isHtml) baseHeaders['Cache-Control'] = 'no-store';
902
905
  if (raw.length < 860) {
903
- res.writeHead(statusCode, { 'Content-Type': contentType, 'Content-Length': raw.length });
906
+ res.writeHead(statusCode, { ...baseHeaders, 'Content-Length': raw.length });
904
907
  res.end(raw);
905
908
  return;
906
909
  }
907
910
  if (acceptsEncoding(req, 'br')) {
908
911
  const compressed = zlib.brotliCompressSync(raw, { params: { [zlib.constants.BROTLI_PARAM_QUALITY]: 4 } });
909
- res.writeHead(statusCode, { 'Content-Type': contentType, 'Content-Encoding': 'br', 'Content-Length': compressed.length });
912
+ res.writeHead(statusCode, { ...baseHeaders, 'Content-Encoding': 'br', 'Content-Length': compressed.length });
910
913
  res.end(compressed);
911
914
  } else if (acceptsEncoding(req, 'gzip')) {
912
915
  const compressed = zlib.gzipSync(raw, { level: 6 });
913
- res.writeHead(statusCode, { 'Content-Type': contentType, 'Content-Encoding': 'gzip', 'Content-Length': compressed.length });
916
+ res.writeHead(statusCode, { ...baseHeaders, 'Content-Encoding': 'gzip', 'Content-Length': compressed.length });
914
917
  res.end(compressed);
915
918
  } else {
916
- res.writeHead(statusCode, { 'Content-Type': contentType, 'Content-Length': raw.length });
919
+ res.writeHead(statusCode, { ...baseHeaders, 'Content-Length': raw.length });
917
920
  res.end(raw);
918
921
  }
919
922
  }
package/static/index.html CHANGED
@@ -9,14 +9,17 @@
9
9
 
10
10
 
11
11
 
12
- <link href="vendor/rippleui.css" rel="stylesheet">
13
- <link rel="preload" href="vendor/prism-dark.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
14
- <noscript><link href="vendor/prism-dark.css" rel="stylesheet"></noscript>
15
- <link rel="preload" href="vendor/highlight-js.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
16
- <script defer src="vendor/highlight.min.js"></script>
17
- <link rel="stylesheet" href="vendor/xterm.css">
18
- <script defer src="vendor/xterm.min.js"></script>
19
- <script defer src="vendor/xterm-addon-fit.min.js"></script>
12
+ <script>
13
+ (function(){
14
+ var b=(window.__BASE_URL||'');
15
+ ['vendor/rippleui.css','vendor/prism-dark.css','vendor/highlight-js.css','vendor/xterm.css'].forEach(function(h){
16
+ var l=document.createElement('link');l.rel='stylesheet';l.href=b+'/'+h;document.head.appendChild(l);
17
+ });
18
+ ['vendor/highlight.min.js','vendor/xterm.min.js','vendor/xterm-addon-fit.min.js'].forEach(function(s){
19
+ var e=document.createElement('script');e.defer=true;e.src=b+'/'+s;document.head.appendChild(e);
20
+ });
21
+ })();
22
+ </script>
20
23
 
21
24
  <style>
22
25
  *, *::before, *::after { box-sizing: border-box; }