clawatch 1.0.13 → 1.0.14

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 (41) hide show
  1. package/dist/cli.js +3 -2
  2. package/dist/cli.js.map +1 -1
  3. package/frontend/.next/BUILD_ID +1 -1
  4. package/frontend/.next/build-manifest.json +2 -2
  5. package/frontend/.next/server/app/_global-error.html +2 -2
  6. package/frontend/.next/server/app/_global-error.rsc +1 -1
  7. package/frontend/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/frontend/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/frontend/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  10. package/frontend/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  11. package/frontend/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  12. package/frontend/.next/server/app/_not-found.html +1 -1
  13. package/frontend/.next/server/app/_not-found.rsc +1 -1
  14. package/frontend/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  15. package/frontend/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  16. package/frontend/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  17. package/frontend/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  18. package/frontend/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  19. package/frontend/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  20. package/frontend/.next/server/app/dashboard.html +1 -1
  21. package/frontend/.next/server/app/dashboard.rsc +1 -1
  22. package/frontend/.next/server/app/dashboard.segments/_full.segment.rsc +1 -1
  23. package/frontend/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
  24. package/frontend/.next/server/app/dashboard.segments/_index.segment.rsc +1 -1
  25. package/frontend/.next/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  26. package/frontend/.next/server/app/dashboard.segments/dashboard/__PAGE__.segment.rsc +1 -1
  27. package/frontend/.next/server/app/dashboard.segments/dashboard.segment.rsc +1 -1
  28. package/frontend/.next/server/app/index.html +1 -1
  29. package/frontend/.next/server/app/index.rsc +1 -1
  30. package/frontend/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  31. package/frontend/.next/server/app/index.segments/_full.segment.rsc +1 -1
  32. package/frontend/.next/server/app/index.segments/_head.segment.rsc +1 -1
  33. package/frontend/.next/server/app/index.segments/_index.segment.rsc +1 -1
  34. package/frontend/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  35. package/frontend/.next/server/pages/404.html +1 -1
  36. package/frontend/.next/server/pages/500.html +2 -2
  37. package/frontend/server-with-proxy.js +82 -0
  38. package/package.json +1 -1
  39. /package/frontend/.next/static/{P4g0K_y2ksljZD88vEDAA → MXEzMiO_GmJh6uODpfgzU}/_buildManifest.js +0 -0
  40. /package/frontend/.next/static/{P4g0K_y2ksljZD88vEDAA → MXEzMiO_GmJh6uODpfgzU}/_clientMiddlewareManifest.json +0 -0
  41. /package/frontend/.next/static/{P4g0K_y2ksljZD88vEDAA → MXEzMiO_GmJh6uODpfgzU}/_ssgManifest.js +0 -0
@@ -1,2 +1,2 @@
1
- <!DOCTYPE html><!--P4g0K_y2ksljZD88vEDAA--><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/5bcee453cc4bce6d.js"/><script src="/_next/static/chunks/82abf2d65f5428ae.js" async=""></script><script src="/_next/static/chunks/f2f58a7e93290fbb.js" async=""></script><script src="/_next/static/chunks/d702a24e2b6c48fa.js" async=""></script><script src="/_next/static/chunks/turbopack-0df1acbb994b2a74.js" async=""></script><script src="/_next/static/chunks/ff1a16fafef87110.js" async=""></script><script src="/_next/static/chunks/d2be314c3ece3fbe.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: Internal Server Error.</title><link rel="icon" href="/favicon.ico?favicon.0b3bf435.ico" sizes="256x256" type="image/x-icon"/><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}
2
- @media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/5bcee453cc4bce6d.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/d2be314c3ece3fbe.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/d2be314c3ece3fbe.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/d2be314c3ece3fbe.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/d2be314c3ece3fbe.js\"],\"ViewportBoundary\"]\n9:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/d2be314c3ece3fbe.js\"],\"MetadataBoundary\"]\nb:I[68027,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/d2be314c3ece3fbe.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"P4g0K_y2ksljZD88vEDAA\",\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"title\",null,{\"children\":\"500: Internal Server Error.\"}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"lineHeight\":\"48px\"},\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\\n@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"paddingRight\":23,\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\"},\"children\":\"500\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"28px\"},\"children\":\"Internal Server Error.\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L7\",null,{\"children\":\"$L8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$La\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"c:I[27201,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/d2be314c3ece3fbe.js\"],\"IconMark\"]\n6:null\na:[[\"$\",\"link\",\"0\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0b3bf435.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$Lc\",\"1\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><!--MXEzMiO_GmJh6uODpfgzU--><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/5bcee453cc4bce6d.js"/><script src="/_next/static/chunks/82abf2d65f5428ae.js" async=""></script><script src="/_next/static/chunks/f2f58a7e93290fbb.js" async=""></script><script src="/_next/static/chunks/d702a24e2b6c48fa.js" async=""></script><script src="/_next/static/chunks/turbopack-0df1acbb994b2a74.js" async=""></script><script src="/_next/static/chunks/ff1a16fafef87110.js" async=""></script><script src="/_next/static/chunks/d2be314c3ece3fbe.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: Internal Server Error.</title><link rel="icon" href="/favicon.ico?favicon.0b3bf435.ico" sizes="256x256" type="image/x-icon"/><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}
2
+ @media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/5bcee453cc4bce6d.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/d2be314c3ece3fbe.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/d2be314c3ece3fbe.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/d2be314c3ece3fbe.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/d2be314c3ece3fbe.js\"],\"ViewportBoundary\"]\n9:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/d2be314c3ece3fbe.js\"],\"MetadataBoundary\"]\nb:I[68027,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/d2be314c3ece3fbe.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"MXEzMiO_GmJh6uODpfgzU\",\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"title\",null,{\"children\":\"500: Internal Server Error.\"}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"lineHeight\":\"48px\"},\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\\n@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"paddingRight\":23,\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\"},\"children\":\"500\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"28px\"},\"children\":\"Internal Server Error.\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L7\",null,{\"children\":\"$L8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$La\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"c:I[27201,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/d2be314c3ece3fbe.js\"],\"IconMark\"]\n6:null\na:[[\"$\",\"link\",\"0\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0b3bf435.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$Lc\",\"1\",{}]]\n"])</script></body></html>
@@ -0,0 +1,82 @@
1
+ // ClaWatch dashboard server: Next.js standalone + API reverse proxy
2
+ // This replaces the default server.js to proxy /api/* to the backend
3
+ const http = require("http");
4
+ const path = require("path");
5
+
6
+ const PORT = parseInt(process.env.PORT || "3456", 10);
7
+ const BACKEND_PORT = process.env.BACKEND_PORT || "3001";
8
+ const HOSTNAME = process.env.HOSTNAME || "0.0.0.0";
9
+
10
+ // Load Next.js request handler
11
+ process.env.PORT = String(PORT);
12
+ process.env.HOSTNAME = HOSTNAME;
13
+ const nextHandler = require("./server.js");
14
+
15
+ // Wait a tick for Next.js to initialize, then wrap with proxy
16
+ setImmediate(() => {
17
+ // Next.js standalone creates its own server on PORT.
18
+ // We need to intercept before that. Instead, let's create a proxy
19
+ // that runs on PORT and forwards to Next.js on an internal port.
20
+ });
21
+
22
+ // Actually, simpler: just start the default server.js which handles Next.js,
23
+ // but we need to patch the request handling to proxy /api/*.
24
+ // Since server.js creates its own http server, we can't easily wrap it.
25
+ //
26
+ // Simplest reliable approach: use http-proxy-like manual proxying
27
+ // by replacing this file as the entry point.
28
+
29
+ // Dynamically load the Next.js app
30
+ const NextServer = require("next/dist/server/next-server").default;
31
+ const conf = require("./.next/required-server-files.json");
32
+
33
+ const nextApp = new NextServer({
34
+ hostname: HOSTNAME,
35
+ port: PORT,
36
+ dir: __dirname,
37
+ dev: false,
38
+ customServer: true,
39
+ conf: conf.config,
40
+ });
41
+
42
+ const handler = nextApp.getRequestHandler();
43
+
44
+ nextApp.prepare().then(() => {
45
+ const server = http.createServer((req, res) => {
46
+ // Proxy /api/* and /health to backend
47
+ if (req.url && (req.url.startsWith("/api/") || req.url === "/health")) {
48
+ const options = {
49
+ hostname: "127.0.0.1",
50
+ port: BACKEND_PORT,
51
+ path: req.url,
52
+ method: req.method,
53
+ headers: { ...req.headers, host: `127.0.0.1:${BACKEND_PORT}` },
54
+ };
55
+
56
+ const proxy = http.request(options, (proxyRes) => {
57
+ // Add CORS headers
58
+ res.writeHead(proxyRes.statusCode || 502, {
59
+ ...proxyRes.headers,
60
+ "access-control-allow-origin": "*",
61
+ });
62
+ proxyRes.pipe(res);
63
+ });
64
+
65
+ proxy.on("error", () => {
66
+ res.writeHead(502, { "Content-Type": "application/json" });
67
+ res.end(JSON.stringify({ error: "Backend not ready" }));
68
+ });
69
+
70
+ req.pipe(proxy);
71
+ return;
72
+ }
73
+
74
+ // Everything else → Next.js
75
+ handler(req, res);
76
+ });
77
+
78
+ server.listen(PORT, HOSTNAME, () => {
79
+ console.log(`▲ Next.js 16 + API proxy`);
80
+ console.log(`✓ Ready on http://localhost:${PORT}`);
81
+ });
82
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawatch",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "Observability & monitoring for AI agents. Track costs, tokens, sessions, and get alerts when things go wrong.",
5
5
  "author": "GENWAY AI <hello@genway.ai>",
6
6
  "license": "MIT",