shraga 0.1.24 → 0.1.25

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": "shraga",
3
- "version": "0.1.24",
3
+ "version": "0.1.25",
4
4
  "description": "The teammate you delegate coding to — a self-hostable, multi-user AI coding agent web UI (Claude Code, with a pluggable engine seam).",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -153,11 +153,18 @@ app.use(express.urlencoded({
153
153
  verify: (req, _res, buf) => { (req as any).rawBody = buf; },
154
154
  }));
155
155
 
156
+ // High-frequency poll routes (pty cwd, list refreshes) are quiet on success — they'd otherwise
157
+ // drown real request logs. Errors and everything else still logs unconditionally.
158
+ const QUIET_POLL_RE = /\/(cwd|ptys|sessions|workspace\/(pty-owners|layout))(\?|$)/;
159
+
156
160
  app.use((req, _res, next) => {
157
161
  const start = Date.now();
158
162
  const orig = _res.end.bind(_res);
159
163
  (_res as any).end = (...args: any[]) => {
160
- console.log(`[http] ${req.method} ${req.url} ${_res.statusCode} (${Date.now() - start}ms)`);
164
+ const quiet = req.method === 'GET' && _res.statusCode < 400 && QUIET_POLL_RE.test(req.url);
165
+ if (!quiet) {
166
+ console.log(`[http] ${req.method} ${req.url} → ${_res.statusCode} (${Date.now() - start}ms)`);
167
+ }
161
168
  return orig(...args);
162
169
  };
163
170
  next();