Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.
TypeScript browser-shellcontrol-planefile-managerhomelabmobile-firstnextjsptyreactself-hostedserver-managementshadcn-uisysadmintailwindcssterminaltypescriptvpsweb-desktopweb-terminal
fix(icons): use native macOS and Windows artwork
Rahman14625d08d3e2
diff --git a/.gitignore b/.gitignoreindex de9b2fcd..b42b9e57 100644--- a/.gitignore+++ b/.gitignore@@ -38,3 +38,7 @@ camoufox-profile*/**/cookies.sqlite***/key4.db**/logins.json++# Python icon-generator bytecode.+__pycache__/+*.py[cod]diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.mdindex 40f13107..080b9dbd 100644--- a/docs/CHANGELOG.md+++ b/docs/CHANGELOG.md@@ -14,6 +14,8 @@ this is the *what*, and it is what Settings → About shows as “What's new”.**Fixed**+- `icons` use native macOS and Windows artwork+- `update` remove passwordless sudo requirement- use official agent logos## 2026-08-18diff --git a/package.json b/package.jsonindex 7a698942..45f18ed8 100644--- a/package.json+++ b/package.json@@ -21,7 +21,7 @@"changelog": "node scripts/gen-changelog.mjs","ship": "bash scripts/ship.sh","smoke": "E2E_BASE_URL=http://localhost:4005 vitest run scripts/e2e/smoke.test.ts",- "icons:app": "node scripts/gen-app-icons.mjs"+ "icons:app": "node scripts/gen-app-icons.mjs && python3 scripts/gen-remaining-platform-icons.py"},"dependencies": {"@anthropic-ai/sdk": "^0.100.1",diff --git a/public/app-icons/launchpad.webp b/public/app-icons/launchpad.webpindex 0bbccdb6..35cb5fd5 100644Binary files a/public/app-icons/launchpad.webp and b/public/app-icons/launchpad.webp differdiff --git a/public/app-icons/macos/assistant.webp b/public/app-icons/macos/assistant.webpindex 91824ce2..9f6a5e21 100644Binary files a/public/app-icons/macos/assistant.webp and b/public/app-icons/macos/assistant.webp differdiff --git a/public/app-icons/macos/claude.webp b/public/app-icons/macos/claude.webpindex 31f93029..6cfc9ee0 100644Binary files a/public/app-icons/macos/claude.webp and b/public/app-icons/macos/claude.webp differdiff --git a/public/app-icons/macos/code.webp b/public/app-icons/macos/code.webpindex 65f514a6..258b4281 100644Binary files a/public/app-icons/macos/code.webp and b/public/app-icons/macos/code.webp differdiff --git a/public/app-icons/macos/create.webp b/public/app-icons/macos/create.webpindex b3f4a1e9..6d53e26b 100644Binary files a/public/app-icons/macos/create.webp and b/public/app-icons/macos/create.webp differdiff --git a/public/app-icons/macos/docs.webp b/public/app-icons/macos/docs.webpindex 9c232fca..08fdb02b 100644Binary files a/public/app-icons/macos/docs.webp and b/public/app-icons/macos/docs.webp differdiff --git a/public/app-icons/macos/files.webp b/public/app-icons/macos/files.webpindex 4a2fef62..88acc190 100644Binary files a/public/app-icons/macos/files.webp and b/public/app-icons/macos/files.webp differdiff --git a/public/app-icons/macos/links.webp b/public/app-icons/macos/links.webpindex b1e23371..749ddbfd 100644Binary files a/public/app-icons/macos/links.webp and b/public/app-icons/macos/links.webp differdiff --git a/public/app-icons/macos/monitor.webp b/public/app-icons/macos/monitor.webpindex 9db6ae4d..20012d94 100644Binary files a/public/app-icons/macos/monitor.webp and b/public/app-icons/macos/monitor.webp differdiff --git a/public/app-icons/macos/reel.webp b/public/app-icons/macos/reel.webpindex d3068cc8..01a1735d 100644Binary files a/public/app-icons/macos/reel.webp and b/public/app-icons/macos/reel.webp differdiff --git a/public/app-icons/macos/settings.webp b/public/app-icons/macos/settings.webpindex 0e1dd43d..7be828a6 100644Binary files a/public/app-icons/macos/settings.webp and b/public/app-icons/macos/settings.webp differdiff --git a/public/app-icons/macos/store.webp b/public/app-icons/macos/store.webpindex bab1a7c5..77e047c3 100644Binary files a/public/app-icons/macos/store.webp and b/public/app-icons/macos/store.webp differdiff --git a/public/app-icons/macos/studio.webp b/public/app-icons/macos/studio.webpindex cd5b9743..c3d95551 100644Binary files a/public/app-icons/macos/studio.webp and b/public/app-icons/macos/studio.webp differdiff --git a/public/app-icons/macos/terminal.webp b/public/app-icons/macos/terminal.webpindex 801e5443..bcdcc02d 100644Binary files a/public/app-icons/macos/terminal.webp and b/public/app-icons/macos/terminal.webp differdiff --git a/public/app-icons/macos/viewer.webp b/public/app-icons/macos/viewer.webpindex 9324cc9b..9c2efbff 100644Binary files a/public/app-icons/macos/viewer.webp and b/public/app-icons/macos/viewer.webp differdiff --git a/public/app-icons/mission-control.webp b/public/app-icons/mission-control.webpindex 24cd5fd4..a489b4e3 100644Binary files a/public/app-icons/mission-control.webp and b/public/app-icons/mission-control.webp differdiff --git a/public/app-icons/windows/assistant.webp b/public/app-icons/windows/assistant.webpindex 91824ce2..ab4dd089 100644Binary files a/public/app-icons/windows/assistant.webp and b/public/app-icons/windows/assistant.webp differdiff --git a/public/app-icons/windows/claude.webp b/public/app-icons/windows/claude.webpindex 31f93029..643d6783 100644Binary files a/public/app-icons/windows/claude.webp and b/public/app-icons/windows/claude.webp differdiff --git a/public/app-icons/windows/code.webp b/public/app-icons/windows/code.webpindex 2a221fb1..27351e1f 100644Binary files a/public/app-icons/windows/code.webp and b/public/app-icons/windows/code.webp differdiff --git a/public/app-icons/windows/create.webp b/public/app-icons/windows/create.webpindex b3f4a1e9..5c509ae0 100644Binary files a/public/app-icons/windows/create.webp and b/public/app-icons/windows/create.webp differdiff --git a/public/app-icons/windows/docs.webp b/public/app-icons/windows/docs.webpindex 9c232fca..9b629387 100644Binary files a/public/app-icons/windows/docs.webp and b/public/app-icons/windows/docs.webp differdiff --git a/public/app-icons/windows/files.webp b/public/app-icons/windows/files.webpindex 35bd1506..9ad8a466 100644Binary files a/public/app-icons/windows/files.webp and b/public/app-icons/windows/files.webp differdiff --git a/public/app-icons/windows/links.webp b/public/app-icons/windows/links.webpindex b1e23371..c054cceb 100644Binary files a/public/app-icons/windows/links.webp and b/public/app-icons/windows/links.webp differdiff --git a/public/app-icons/windows/monitor.webp b/public/app-icons/windows/monitor.webpindex f1b29658..6318e96a 100644Binary files a/public/app-icons/windows/monitor.webp and b/public/app-icons/windows/monitor.webp differdiff --git a/public/app-icons/windows/reel.webp b/public/app-icons/windows/reel.webpindex d3068cc8..a6af53d5 100644Binary files a/public/app-icons/windows/reel.webp and b/public/app-icons/windows/reel.webp differdiff --git a/public/app-icons/windows/settings.webp b/public/app-icons/windows/settings.webpindex 495dbe5f..cf61a937 100644Binary files a/public/app-icons/windows/settings.webp and b/public/app-icons/windows/settings.webp differdiff --git a/public/app-icons/windows/store.webp b/public/app-icons/windows/store.webpindex bab1a7c5..f9ce6b58 100644Binary files a/public/app-icons/windows/store.webp and b/public/app-icons/windows/store.webp differdiff --git a/public/app-icons/windows/studio.webp b/public/app-icons/windows/studio.webpindex cd5b9743..9a7a593a 100644Binary files a/public/app-icons/windows/studio.webp and b/public/app-icons/windows/studio.webp differdiff --git a/public/app-icons/windows/terminal.webp b/public/app-icons/windows/terminal.webpindex e25d432c..1c8e50a2 100644Binary files a/public/app-icons/windows/terminal.webp and b/public/app-icons/windows/terminal.webp differdiff --git a/public/app-icons/windows/viewer.webp b/public/app-icons/windows/viewer.webpindex 9324cc9b..b2b4da55 100644Binary files a/public/app-icons/windows/viewer.webp and b/public/app-icons/windows/viewer.webp differdiff --git a/scripts/gen-remaining-platform-icons.py b/scripts/gen-remaining-platform-icons.pyindex 22ccdac2..543ebdee 100644--- a/scripts/gen-remaining-platform-icons.py+++ b/scripts/gen-remaining-platform-icons.py@@ -1,72 +1,426 @@from PIL import Image, ImageDraw, ImageFilter-import math, os--ROOT='/home/rahman/projects/mso/public/app-icons'-S=768--def lerp(a,b,t): return int(a+(b-a)*t)-def gradient(c1,c2):- im=Image.new('RGB',(S,S)); p=im.load()- for y in range(S):- t=y/(S-1); c=tuple(lerp(c1[i],c2[i],t) for i in range(3))- for x in range(S): p[x,y]=c- return im.convert('RGBA')-def rrect(d,b,r,f): d.rounded_rectangle(b,radius=r,fill=f)-def capsule(d,b,f): d.rounded_rectangle(b,radius=(b[3]-b[1])//2,fill=f)-def shadow(base,b,r,blur=24,dy=18,alpha=70):- sh=Image.new('RGBA',(S,S)); d=ImageDraw.Draw(sh); x0,y0,x1,y1=b- d.rounded_rectangle((x0,y0+dy,x1,y1+dy),radius=r,fill=(0,0,0,alpha))- base.alpha_composite(sh.filter(ImageFilter.GaussianBlur(blur)))-def sparkle(d,cx,cy,r,color):+import math+import numpy as np+from pathlib import Path++S=1024++def rgba(c, a=255):+ if len(c)==4: return c+ return (*c,a)++def lerp_color(c1,c2,t):+ return tuple(round(c1[i]+(c2[i]-c1[i])*t) for i in range(4))++def linear_gradient(size, c1, c2, start=(0,0), end=(1,1)):+ w, h = size+ c1 = np.asarray(rgba(c1), dtype=np.float32)+ c2 = np.asarray(rgba(c2), dtype=np.float32)+ sx, sy = start[0] * w, start[1] * h+ ex, ey = end[0] * w, end[1] * h+ vx, vy = ex - sx, ey - sy+ denominator = vx * vx + vy * vy or 1.0+ yy, xx = np.mgrid[0:h, 0:w]+ t = np.clip(((xx - sx) * vx + (yy - sy) * vy) / denominator, 0.0, 1.0)+ pixels = c1[None, None, :] + (c2 - c1)[None, None, :] * t[..., None]+ return Image.fromarray(np.rint(pixels).astype(np.uint8), 'RGBA')++def radial_gradient(size, inner, outer, center=(0.5,0.45), radius=0.7):+ w, h = size+ inner = np.asarray(rgba(inner), dtype=np.float32)+ outer = np.asarray(rgba(outer), dtype=np.float32)+ cx, cy = center[0] * w, center[1] * h+ yy, xx = np.mgrid[0:h, 0:w]+ t = np.clip(np.hypot(xx - cx, yy - cy) / (radius * max(w, h)), 0.0, 1.0)+ pixels = inner[None, None, :] + (outer - inner)[None, None, :] * t[..., None]+ return Image.fromarray(np.rint(pixels).astype(np.uint8), 'RGBA')++def mask_roundrect(box, radius):+ m=Image.new('L',(S,S),0); d=ImageDraw.Draw(m)+ d.rounded_rectangle(box,radius=radius,fill=255)+ return m++def mask_ellipse(box):+ m=Image.new('L',(S,S),0); ImageDraw.Draw(m).ellipse(box,fill=255); return m++def paste_mask(base, fill, mask):+ if isinstance(fill, tuple):+ layer=Image.new('RGBA',(S,S),fill)+ else:+ layer=fill+ base.alpha_composite(Image.composite(layer, Image.new('RGBA',(S,S)), mask))++def shadow_from_mask(base, mask, offset=(0,30), blur=32, color=(0,0,0,90)):+ sh=Image.new('RGBA',(S,S),(0,0,0,0))+ colored=Image.new('RGBA',(S,S),color)+ shifted=Image.new('L',(S,S),0)+ shifted.paste(mask,(offset[0],offset[1]))+ shifted=shifted.filter(ImageFilter.GaussianBlur(blur))+ sh=Image.composite(colored,sh,shifted)+ base.alpha_composite(sh)++def draw_line(draw, points, fill, width, joint="curve"):+ draw.line(points, fill=fill, width=width, joint=joint)++def rounded_polygon_mask(points, radius=0):+ m=Image.new('L',(S,S),0); ImageDraw.Draw(m).polygon(points,fill=255); return m++def draw_sparkle(draw,cx,cy,r,fill,inner=0.28,points=4,angle=-math.pi/2):pts=[]- for i in range(8):- a=-math.pi/2+i*math.pi/4; rr=r if i%2==0 else r*.28+ for i in range(points*2):+ a=angle+i*math.pi/points+ rr=r if i%2==0 else r*innerpts.append((cx+math.cos(a)*rr,cy+math.sin(a)*rr))- d.polygon(pts,fill=color)-def canvas(osname):- if osname=='macos':- im=gradient((252,252,253),(231,236,246)); d=ImageDraw.Draw(im)- d.rounded_rectangle((18,18,S-18,S-18),radius=168,outline=(130,145,170,35),width=5)- return im- im=gradient((35,43,61),(16,24,38)); d=ImageDraw.Draw(im)- d.rounded_rectangle((18,18,S-18,S-18),radius=132,outline=(255,255,255,24),width=4)+ draw.polygon(pts,fill=fill)++def mac_canvas(top,bottom, accent=None):+ im=Image.new('RGBA',(S,S),(0,0,0,0))+ box=(92,66,932,906); r=190+ mask=mask_roundrect(box,r)+ shadow_from_mask(im,mask,(0,46),52,(8,16,38,110))+ bg=linear_gradient((S,S),top,bottom,(0.12,0.02),(0.88,0.98))+ paste_mask(im,bg,mask)+ shine=Image.new('RGBA',(S,S),(0,0,0,0))+ sd=ImageDraw.Draw(shine)+ sd.rounded_rectangle((106,80,918,420),radius=170,fill=(255,255,255,30))+ shine=shine.filter(ImageFilter.GaussianBlur(20))+ im.alpha_composite(Image.composite(shine,Image.new('RGBA',(S,S)),mask))+ d=ImageDraw.Draw(im)+ d.rounded_rectangle(box,radius=r,outline=(255,255,255,75),width=7)+ d.rounded_rectangle((99,73,925,899),radius=183,outline=(0,0,0,30),width=4)return im-def save(im,osname,name):- p=f'{ROOT}/{osname}/{name}.webp'; os.makedirs(os.path.dirname(p),exist_ok=True)- im.resize((256,256),Image.Resampling.LANCZOS).convert('RGB').save(p,'WEBP',quality=84,method=6)--def claude(o):- im=canvas(o); b=(145,170,623,598); shadow(im,b,76,22,14,75 if o=='macos' else 110); d=ImageDraw.Draw(im)- rrect(d,b,76,(37,40,49,255) if o=='macos' else (25,31,44,255))- cols=[(255,95,87,255),(255,189,46,255),(40,200,64,255)] if o=='macos' else [(94,108,140,255)]*3- for i,c in enumerate(cols): d.ellipse((185+i*52,205,211+i*52,231),fill=c)- capsule(d,(214,355,292,372),(238,241,247,255)); capsule(d,(278,335,296,390),(238,241,247,255))- d.ellipse((415,300,550,435),fill=(112,78,245,255) if o=='macos' else (47,121,255,255)); sparkle(d,482,367,48,(255,255,255,255)); return im-def reel(o):- im=canvas(o); b=(145,210,623,570); shadow(im,b,64,22,16,75 if o=='macos' else 110); d=ImageDraw.Draw(im)- rrect(d,b,64,(60,63,74,255) if o=='macos' else (76,52,155,255)); d.rounded_rectangle((165,160,608,286),radius=30,fill=(30,34,43,255) if o=='macos' else (39,46,68,255))- for x in [190,310,430,550]: d.polygon([(x,160),(x+58,160),(x+15,286),(x-43,286)],fill=(245,246,249,255))- rrect(d,(250,335,520,505),42,(166,64,235,255) if o=='macos' else (87,73,230,255)); d.polygon([(350,372),(350,468),(442,420)],fill=(255,255,255,245)); return im-def viewer(o):- im=canvas(o); b=(160,160,608,608); shadow(im,b,70,22,15,70 if o=='macos' else 100); d=ImageDraw.Draw(im)- rrect(d,b,70,(44,156,232,255) if o=='macos' else (33,91,181,255)); rrect(d,(190,190,578,520),48,(154,220,255,255) if o=='macos' else (83,154,230,255)); d.ellipse((438,245,505,312),fill=(255,220,88,255))- d.polygon([(190,475),(310,332),(390,420),(455,350),(578,500),(578,520),(190,520)],fill=(35,92,185,255)); d.polygon([(190,495),(285,402),(345,455),(408,392),(515,520),(190,520)],fill=(66,130,224,255)); return im-def create(o):- im=canvas(o); b=(160,160,608,608); shadow(im,b,70,22,15,70 if o=='macos' else 105); d=ImageDraw.Draw(im); rrect(d,b,70,(105,87,235,255) if o=='macos' else (44,101,213,255))- for x,y in [(220,235),(370,235),(220,385),(370,385)]: rrect(d,(x,y,x+105,y+105),30,(245,247,253,245))- d.polygon([(422,235),(475,288),(422,341),(369,288)],fill=(213,220,255,255)); sparkle(d,538,210,62,(255,255,255,255)); return im-def links(o):- im=canvas(o); d=ImageDraw.Draw(im); d.ellipse((185,220,435,470),fill=(115,83,241,255) if o=='macos' else (46,102,224,255)); d.ellipse((333,300,583,550),fill=(72,129,244,255) if o=='macos' else (104,70,230,255))- capsule(d,(245,300,455,380),(255,255,255,245)); capsule(d,(355,390,545,470),(255,255,255,245)); capsule(d,(282,323,420,357),(101,92,230,255) if o=='macos' else (39,78,175,255)); capsule(d,(390,413,510,447),(75,114,235,255) if o=='macos' else (80,62,180,255)); return im-def hermes(o):- im=canvas(o); d=ImageDraw.Draw(im); d.ellipse((285,285,483,483),fill=(112,79,244,255) if o=='macos' else (45,111,224,255)); wing=(255,255,255,242)- d.polygon([(300,345),(175,275),(210,350),(145,350),(255,435)],fill=wing); d.polygon([(468,345),(593,275),(558,350),(623,350),(513,435)],fill=wing); d.ellipse((322,325,446,449),fill=(238,241,249,255)); d.rectangle((350,385,418,445),fill=(238,241,249,255)); d.ellipse((367,348,401,382),fill=(91,116,247,255)); return im-def openclaw(o):- im=canvas(o); d=ImageDraw.Draw(im); col=(244,96,55,255) if o=='macos' else (255,114,51,255); d.ellipse((286,388,482,570),fill=(87,45,46,255) if o=='macos' else (84,48,39,255))- for off in [-105,0,105]:- x=384+off; d.polygon([(x-42,175),(x+15,160),(x+65,372),(x+18,390)],fill=col); d.polygon([(x-20,190),(x+8,182),(x+42,325),(x+20,332)],fill=(255,170,102,160))++def win_canvas():+ return Image.new('RGBA',(S,S),(0,0,0,0))++def add_roundrect(base, box, radius, fill, shadow=(0,28,32,(0,0,0,80)), outline=None, width=0):+ m=mask_roundrect(box,radius)+ if shadow:+ dx,dy,blur,col=shadow+ shadow_from_mask(base,m,(dx,dy),blur,col)+ paste_mask(base,fill,m)+ if outline:+ ImageDraw.Draw(base).rounded_rectangle(box,radius=radius,outline=outline,width=width or 5)+ return m++def add_ellipse(base, box, fill, shadow=None, outline=None, width=0):+ m=mask_ellipse(box)+ if shadow:+ dx,dy,blur,col=shadow+ shadow_from_mask(base,m,(dx,dy),blur,col)+ paste_mask(base,fill,m)+ if outline:+ ImageDraw.Draw(base).ellipse(box,outline=outline,width=width or 5)+ return m++def gear_points(cx,cy,outer,inner,teeth=10,angle=-math.pi/2):+ pts=[]+ for i in range(teeth*4):+ a=angle+i*math.pi/(teeth*2)+ phase=i%4+ r=outer if phase in (0,1) else inner+ pts.append((cx+math.cos(a)*r,cy+math.sin(a)*r))+ return pts++def mac_icon(name):+ palettes={+ 'files':((88,181,255,255),(30,92,219,255)),+ 'code':((132,92,255,255),(45,26,128,255)),+ 'terminal':((69,76,92,255),(17,20,27,255)),+ 'claude':((244,151,112,255),(174,78,56,255)),+ 'studio':((255,183,84,255),(225,76,93,255)),+ 'reel':((170,105,255,255),(86,42,196,255)),+ 'viewer':((94,211,255,255),(24,102,214,255)),+ 'store':((85,191,255,255),(63,82,226,255)),+ 'create':((104,227,243,255),(83,62,231,255)),+ 'monitor':((95,111,123,255),(25,30,38,255)),+ 'assistant':((197,121,255,255),(75,43,202,255)),+ 'settings':((204,216,231,255),(94,107,130,255)),+ 'links':((135,182,255,255),(86,64,225,255)),+ 'docs':((116,209,255,255),(28,94,207,255)),+ }+ im=mac_canvas(*palettes[name])+ d=ImageDraw.Draw(im)+ white=(250,252,255,255)+ if name=='files':+ add_roundrect(im,(205,315,820,720),85,linear_gradient((S,S),(104,206,255,255),(30,115,234,255),(0,0),(1,1)),(0,30,28,(0,26,87,70)),(255,255,255,70),5)+ d.rounded_rectangle((240,255,495,390),radius=55,fill=(154,225,255,255))+ d.polygon([(512,315),(820,315),(820,720),(512,720)],fill=(24,92,205,150))+ d.line((512,330,512,690),fill=(255,255,255,75),width=6)+ d.ellipse((330,445,360,485),fill=white)+ d.ellipse((645,445,675,485),fill=white)+ d.arc((340,495,680,640),start=12,end=168,fill=white,width=24)+ elif name=='code':+ add_roundrect(im,(190,230,835,750),78,(238,242,255,245),(0,34,34,(0,0,45,85)),(255,255,255,100),5)+ d.rounded_rectangle((190,230,835,345),radius=78,fill=(35,38,57,255))+ d.rectangle((190,300,835,345),fill=(35,38,57,255))+ for x,c in zip((250,305,360),((255,94,88,255),(255,190,55,255),(50,205,86,255))):+ d.ellipse((x,270,x+28,298),fill=c)+ draw_line(d,[(390,455),(310,520),(390,585)],(101,70,230,255),28)+ draw_line(d,[(635,455),(715,520),(635,585)],(101,70,230,255),28)+ draw_line(d,[(560,420),(470,625)],(235,83,163,255),24)+ elif name=='terminal':+ add_roundrect(im,(180,225,844,755),82,(27,30,38,255),(0,34,34,(0,0,0,100)),(255,255,255,65),5)+ d.rounded_rectangle((180,225,844,345),radius=82,fill=(54,58,70,255))+ d.rectangle((180,300,844,345),fill=(54,58,70,255))+ for x,c in zip((240,295,350),((255,94,88,255),(255,190,55,255),(50,205,86,255))):+ d.ellipse((x,266,x+28,294),fill=c)+ draw_line(d,[(305,470),(395,540),(305,610)],(99,235,164,255),28)+ d.rounded_rectangle((440,580,620,607),radius=13,fill=(238,243,248,255))+ elif name=='claude':+ add_ellipse(im,(250,190,775,715),linear_gradient((S,S),(255,190,151,255),(204,84,62,255),(0,0),(1,1)),(0,30,36,(73,20,6,80)),(255,255,255,80),6)+ for a in [0,math.pi/3,2*math.pi/3]:+ x1=512+math.cos(a)*115; y1=445+math.sin(a)*115+ x2=512-math.cos(a)*115; y2=445-math.sin(a)*115+ d.line((x1,y1,x2,y2),fill=white,width=36)+ d.ellipse((487,420,537,470),fill=white)+ add_roundrect(im,(485,585,790,765),52,(27,30,38,250),(0,18,20,(0,0,0,100)),(255,255,255,55),4)+ draw_line(d,[(550,640),(590,675),(550,710)],(255,172,122,255),16)+ d.rounded_rectangle((620,695,720,711),radius=8,fill=white)+ elif name=='studio':+ add_roundrect(im,(205,245,805,745),76,(252,248,245,250),(0,30,36,(72,18,40,80)),(255,255,255,110),6)+ d.rounded_rectangle((240,290,770,690),radius=52,fill=(255,184,108,255))+ d.ellipse((600,345,690,435),fill=(255,238,157,255))+ d.polygon([(240,635),(395,455),(520,575),(610,480),(770,650),(770,690),(240,690)],fill=(219,75,112,255))+ d.polygon([(240,650),(350,535),(455,640),(550,555),(690,690),(240,690)],fill=(104,70,219,210))+ draw_sparkle(d,760,255,70,white,0.25)+ elif name=='reel':+ add_roundrect(im,(205,295,810,735),75,(82,45,155,255),(0,30,34,(25,5,65,95)),(255,255,255,60),5)+ d.rounded_rectangle((235,220,790,400),radius=45,fill=(32,35,48,255))+ for x in (250,390,530,670):+ d.polygon([(x,220),(x+100,220),(x+45,400),(x-55,400)],fill=(245,246,250,255))+ d.rounded_rectangle((360,455,655,655),radius=52,fill=(159,83,244,255))+ d.polygon([(465,500),(465,610),(575,555)],fill=white)+ elif name=='viewer':+ add_roundrect(im,(205,250,770,720),72,(242,247,252,250),(0,30,34,(0,35,80,85)),(255,255,255,105),5)+ d.rounded_rectangle((240,285,735,675),radius=46,fill=(115,207,255,255))+ d.ellipse((580,340,665,425),fill=(255,231,117,255))+ d.polygon([(240,625),(380,455),(500,570),(585,490),(735,650),(735,675),(240,675)],fill=(45,123,221,255))+ d.ellipse((560,500,800,740),outline=(32,40,60,255),width=38)+ d.line((740,680,830,770),fill=(32,40,60,255),width=46)+ d.ellipse((586,526,774,714),outline=(255,255,255,155),width=8)+ elif name=='store':+ add_roundrect(im,(245,320,780,755),96,linear_gradient((S,S),(101,212,255,255),(67,72,222,255),(0,0),(1,1)),(0,34,38,(20,16,80,90)),(255,255,255,75),5)+ d.arc((350,175,675,470),start=190,end=350,fill=white,width=38)+ d.line((420,590,515,420),fill=white,width=38)+ d.line((515,420,615,590),fill=white,width=38)+ d.line((390,590,640,590),fill=white,width=38)+ elif name=='create':+ for box,col in [((220,250,445,475),(245,248,255,245)),((485,250,710,475),(221,232,255,245)),((220,510,445,735),(221,240,255,245)),((485,510,710,735),(245,248,255,245))]:+ add_roundrect(im,box,54,col,(0,20,22,(20,20,90,40)),(255,255,255,80),4)+ d.line((500,610,765,345),fill=(35,43,72,255),width=38)+ d.line((520,630,785,365),fill=white,width=18)+ draw_sparkle(d,790,320,95,white,0.23)+ draw_sparkle(d,330,355,52,(98,80,230,255),0.25)+ elif name=='monitor':+ add_roundrect(im,(205,220,820,745),92,(28,31,38,255),(0,38,42,(0,0,0,105)),(255,255,255,55),5)+ d.ellipse((285,290,740,700),fill=(20,25,31,255),outline=(140,156,168,255),width=18)+ for off in (0,60,120):+ d.arc((320+off//2,325+off//2,705-off//2,665-off//2),start=210,end=510,fill=(76,90,100,255),width=5)+ pts=[(315,545),(390,545),(430,455),(480,600),(535,390),(585,535),(705,535)]+ d.line(pts,fill=(104,238,123,255),width=25,joint='curve')+ for p in pts:+ d.ellipse((p[0]-13,p[1]-13,p[0]+13,p[1]+13),fill=(160,255,170,255))+ elif name=='assistant':+ add_ellipse(im,(215,205,785,775),radial_gradient((S,S),(231,188,255,255),(93,45,210,255),(0.4,0.3),0.65),(0,34,40,(36,6,87,95)),(255,255,255,70),6)+ draw_sparkle(d,500,475,150,white,0.23)+ draw_sparkle(d,710,315,65,(211,232,255,255),0.25)+ draw_sparkle(d,300,655,58,(236,208,255,255),0.25)+ d.ellipse((355,330,645,620),outline=(255,255,255,45),width=10)+ elif name=='settings':+ pts=gear_points(512,500,280,220,teeth=10)+ m=rounded_polygon_mask(pts)+ shadow_from_mask(im,m,(0,34),35,(20,30,55,95))+ paste_mask(im,linear_gradient((S,S),(247,250,253,255),(139,154,178,255),(0,0),(1,1)),m)+ d.polygon(pts,outline=(255,255,255,100))+ d.ellipse((350,338,674,662),fill=(83,99,126,255),outline=(255,255,255,80),width=8)+ d.ellipse((430,418,594,582),fill=(205,216,231,255))+ elif name=='links':+ def capsule_link(points,col,outline):+ d.line(points,fill=outline,width=150,joint='curve')+ d.line(points,fill=col,width=105,joint='curve')+ capsule_link([(310,590),(310,430),(430,310),(590,310)],(242,247,255,255),(47,62,111,160))+ capsule_link([(435,690),(595,690),(715,570),(715,410)],(222,232,255,255),(47,62,111,160))+ d.line((410,590,615,410),fill=(104,91,231,255),width=72)+ d.line((435,565,590,435),fill=white,width=26)+ elif name=='docs':+ add_roundrect(im,(265,205,720,760),56,(247,250,255,255),(0,32,36,(0,36,90,80)),(255,255,255,100),5)+ d.polygon([(575,205),(720,350),(575,350)],fill=(190,220,250,255))+ d.line((575,205,575,350,720,350),fill=(130,180,235,255),width=5)+ for y,w in ((440,300),(510,330),(580,270),(650,320)):+ d.rounded_rectangle((330,y,330+w,y+24),radius=12,fill=(67,122,220,220))+ add_roundrect(im,(185,550,395,765),54,(51,117,230,255),(0,18,22,(0,30,80,90)),(255,255,255,70),4)+ d.line((240,655,280,695,345,610),fill=white,width=25,joint='curve')+ return im++def win_icon(name):+ im=win_canvas()+ d=ImageDraw.Draw(im)+ white=(250,252,255,255)+ def grad(c1,c2): return linear_gradient((S,S),c1,c2,(0.1,0.05),(0.9,0.95))+ if name=='files':+ back_pts=[(175,330),(420,330),(485,245),(800,245),(850,330),(850,730),(175,730)]+ m=rounded_polygon_mask(back_pts); shadow_from_mask(im,m,(0,35),35,(28,35,45,90))+ d.polygon(back_pts,fill=(253,190,55,255))+ d.rounded_rectangle((175,360,850,735),radius=65,fill=(255,206,76,255),outline=(255,232,141,255),width=8)+ d.rounded_rectangle((210,395,815,470),radius=30,fill=(255,221,106,255))+ d.rounded_rectangle((525,320,770,620),radius=38,fill=(74,151,245,255))+ d.polygon([(680,320),(770,410),(680,410)],fill=(153,204,255,255))+ elif name=='code':+ add_roundrect(im,(230,260,775,730),58,grad((64,108,241,255),(117,69,225,255)),(0,36,38,(30,20,80,90)),(255,255,255,60),5)+ d.line((410,400,300,495,410,590),fill=white,width=34,joint='curve')+ d.line((595,400,705,495,595,590),fill=white,width=34,joint='curve')+ d.line((555,350,455,640),fill=(216,225,255,255),width=28)+ elif name=='terminal':+ add_roundrect(im,(185,255,835,730),58,(29,35,48,255),(0,38,40,(0,0,0,110)),(95,111,137,255),6)+ d.rounded_rectangle((185,255,835,350),radius=58,fill=(58,73,104,255))+ d.rectangle((185,315,835,350),fill=(58,73,104,255))+ d.line((300,450,385,525,300,600),fill=(70,167,255,255),width=30,joint='curve')+ d.rounded_rectangle((430,590,620,615),radius=12,fill=white)+ elif name=='claude':+ add_ellipse(im,(255,215,755,715),grad((247,167,126,255),(194,75,55,255)),(0,35,40,(60,20,10,90)),(255,255,255,45),5)+ for a in [0,math.pi/3,2*math.pi/3]:+ d.line((512+math.cos(a)*115,465+math.sin(a)*115,512-math.cos(a)*115,465-math.sin(a)*115),fill=white,width=34)+ add_roundrect(im,(445,585,790,745),42,(30,36,49,255),(0,20,22,(0,0,0,80)),None)+ d.line((505,625,550,665,505,705),fill=(255,151,112,255),width=16)+ d.rounded_rectangle((585,690,705,706),radius=8,fill=white)+ elif name=='studio':+ add_roundrect(im,(200,250,800,735),58,(245,248,252,255),(0,36,38,(30,45,65,80)),(180,193,210,255),5)+ d.rounded_rectangle((235,285,765,700),radius=36,fill=(79,170,248,255))+ d.ellipse((610,335,690,415),fill=(255,221,101,255))+ d.polygon([(235,650),(385,455),(515,585),(610,505),(765,670),(765,700),(235,700)],fill=(78,100,219,255))+ d.polygon([(235,670),(345,550),(445,650),(525,575),(680,700),(235,700)],fill=(99,205,178,255))+ elif name=='reel':+ add_roundrect(im,(205,315,810,735),58,grad((112,70,218,255),(68,38,150,255)),(0,36,38,(32,15,75,90)),(255,255,255,45),5)+ d.rounded_rectangle((225,220,790,390),radius=30,fill=(41,48,65,255))+ for x in (245,390,535,680):+ d.polygon([(x,220),(x+95,220),(x+45,390),(x-50,390)],fill=(238,241,247,255))+ d.polygon([(450,470),(450,625),(605,548)],fill=white)+ elif name=='viewer':+ add_roundrect(im,(195,255,745,715),58,(245,248,252,255),(0,36,38,(30,45,65,80)),(175,190,208,255),5)+ d.rounded_rectangle((225,285,715,685),radius=36,fill=(96,190,250,255))+ d.ellipse((575,335,655,415),fill=(255,220,94,255))+ d.polygon([(225,640),(365,475),(480,580),(565,505),(715,660),(715,685),(225,685)],fill=(47,111,211,255))+ d.ellipse((540,500,790,750),outline=(55,69,91,255),width=36)+ d.line((730,690,835,790),fill=(55,69,91,255),width=44)+ elif name=='store':+ add_roundrect(im,(245,330,785,750),64,grad((67,168,255,255),(45,103,220,255)),(0,36,38,(25,45,90,90)),(255,255,255,45),5)+ d.arc((355,185,675,480),start=190,end=350,fill=white,width=34)+ for bx,by in ((390,470),(520,470),(390,600),(520,600)):+ d.rounded_rectangle((bx,by,bx+100,by+100),radius=10,fill=white)+ elif name=='create':+ add_roundrect(im,(245,300,675,730),68,grad((78,164,255,255),(103,73,225,255)),(0,36,38,(35,25,90,90)),(255,255,255,55),5)+ d.line((410,650,735,325),fill=(45,54,77,255),width=48)+ d.line((430,670,755,345),fill=white,width=20)+ draw_sparkle(d,770,300,100,(90,194,255,255),0.22)+ draw_sparkle(d,265,255,55,(150,113,245,255),0.25)+ elif name=='monitor':+ add_roundrect(im,(185,250,840,700),58,(34,41,55,255),(0,38,42,(0,0,0,110)),(92,108,132,255),6)+ for y in (360,455,550):+ d.line((235,y,790,y),fill=(74,88,110,255),width=4)+ pts=[(235,585),(325,585),(380,465),(445,620),(520,390),(600,545),(790,545)]+ d.line(pts,fill=(86,221,126,255),width=22,joint='curve')+ d.rounded_rectangle((455,700,570,790),radius=22,fill=(89,105,128,255))+ d.rounded_rectangle((355,775,670,815),radius=20,fill=(120,135,158,255))+ elif name=='assistant':+ add_ellipse(im,(230,205,790,765),radial_gradient((S,S),(217,194,255,255),(78,60,217,255),(0.4,0.3),0.68),(0,38,42,(35,20,90,100)),(255,255,255,50),5)+ draw_sparkle(d,500,485,145,white,0.22)+ draw_sparkle(d,720,320,62,(128,210,255,255),0.25)+ draw_sparkle(d,300,675,54,(196,171,255,255),0.25)+ elif name=='settings':+ pts=gear_points(512,500,285,215,teeth=10)+ m=rounded_polygon_mask(pts); shadow_from_mask(im,m,(0,38),38,(22,30,45,100))+ paste_mask(im,grad((205,216,230,255),(109,125,151,255)),m)+ d.ellipse((350,338,674,662),fill=(66,105,178,255))+ d.ellipse((435,423,589,577),fill=(220,230,241,255))+ elif name=='links':+ d.line([(310,600),(310,430),(440,300),(600,300)],fill=(43,96,203,255),width=145,joint='curve')+ d.line([(310,600),(310,430),(440,300),(600,300)],fill=(142,197,255,255),width=88,joint='curve')+ d.line([(420,705),(585,705),(720,570),(720,405)],fill=(72,65,201,255),width=145,joint='curve')+ d.line([(420,705),(585,705),(720,570),(720,405)],fill=(177,170,255,255),width=88,joint='curve')+ d.line((430,585,610,405),fill=white,width=24)+ elif name=='docs':+ add_roundrect(im,(270,210,735,765),42,(247,250,253,255),(0,36,38,(28,40,65,85)),(180,194,210,255),5)+ d.polygon([(580,210),(735,365),(580,365)],fill=(173,216,255,255))+ d.line((580,210,580,365,735,365),fill=(101,164,230,255),width=5)+ for y,w in ((450,300),(520,335),(590,270),(660,315)):+ d.rounded_rectangle((335,y,335+w,y+22),radius=11,fill=(54,121,225,220))+ add_roundrect(im,(185,560,405,780),44,grad((62,158,255,255),(38,99,215,255)),(0,20,24,(10,35,85,85)),None)+ for bx,by in ((235,610),(305,610),(235,680),(305,680)):+ d.rectangle((bx,by,bx+52,by+52),fill=white)return im-for osname in ('macos','windows'):- for name,fn in {'claude':claude,'reel':reel,'viewer':viewer,'create':create,'links':links,'hermes':hermes,'openclaw':openclaw}.items(): save(fn(osname),osname,name)-print('generated 14 raster WebP icons')+def mac_special(name):+ if name=='launchpad':+ im=mac_canvas((91,105,132,255),(28,34,51,255))+ d=ImageDraw.Draw(im)+ cols=[(76,170,255,255),(245,102,143,255),(255,184,63,255),(86,216,157,255),(135,90,239,255),(71,120,229,255),(255,121,82,255),(175,196,221,255),(102,219,237,255)]+ xs=[270,420,570]; ys=[270,420,570]+ for i,(y,x) in enumerate([(y,x) for y in ys for x in xs]):+ d.rounded_rectangle((x,y,x+110,y+110),radius=28,fill=cols[i],outline=(255,255,255,60),width=4)+ d.rounded_rectangle((x+12,y+12,x+98,y+42),radius=18,fill=(255,255,255,30))+ return im+ if name=='mission-control':+ im=mac_canvas((94,108,138,255),(29,35,53,255))+ d=ImageDraw.Draw(im)+ for box,col,top in [((220,280,620,570),(63,76,104,255),(93,109,145,255)),((400,230,805,530),(58,70,98,255),(104,119,154,255)),((300,430,730,735),(42,50,70,255),(92,109,145,255))]:+ add_roundrect(im,box,48,col,(0,20,24,(0,0,0,80)),(255,255,255,55),4)+ x0,y0,x1,y1=box+ d.rounded_rectangle((x0,y0,x1,y0+72),radius=48,fill=top)+ d.rectangle((x0,y0+38,x1,y0+72),fill=top)+ for i,c in enumerate(((255,95,89,255),(255,190,55,255),(52,204,85,255))):+ d.ellipse((x0+30+i*44,y0+22,x0+50+i*44,y0+42),fill=c)+ d.rounded_rectangle((355,515,675,675),radius=24,fill=(91,112,168,255))+ d.line((390,565,635,565),fill=(180,202,255,180),width=14)+ d.line((390,615,580,615),fill=(180,202,255,150),width=14)+ return im++NAMES = ['files','code','terminal','claude','studio','reel','viewer','store','create','monitor','assistant','settings','links','docs']+ROOT = Path(__file__).resolve().parents[1]+OUT = ROOT / 'public' / 'app-icons'+PREVIEW = Path('/tmp/mso-platform-icon-preview')++def save_webp(image, path):+ path.parent.mkdir(parents=True, exist_ok=True)+ final = image.resize((256, 256), Image.Resampling.LANCZOS)+ final.save(path, 'WEBP', quality=92, alpha_quality=100, method=6, exact=True)++def make_preview(platform, files):+ cell = 300+ cols = 7+ rows = math.ceil(len(files) / cols)+ bg = (232, 236, 244, 255) if platform == 'macos' else (247, 249, 252, 255)+ sheet = Image.new('RGBA', (cols * cell, rows * cell), bg)+ draw = ImageDraw.Draw(sheet)+ for index, path in enumerate(files):+ icon = Image.open(path).convert('RGBA')+ x = (index % cols) * cell + 22+ y = (index // cols) * cell + 8+ sheet.alpha_composite(icon, (x, y))+ draw.text(((index % cols) * cell + 12, (index // cols) * cell + 268), path.stem, fill=(24, 30, 42, 255))+ PREVIEW.mkdir(parents=True, exist_ok=True)+ sheet.convert('RGB').save(PREVIEW / f'{platform}.jpg', quality=92)++def main():+ generated = {'macos': [], 'windows': []}+ for platform, maker in (('macos', mac_icon), ('windows', win_icon)):+ for name in NAMES:+ path = OUT / platform / f'{name}.webp'+ save_webp(maker(name), path)+ generated[platform].append(path)+ for name in ('launchpad', 'mission-control'):+ path = OUT / f'{name}.webp'+ save_webp(mac_special(name), path)+ generated['macos'].append(path)+ for platform, files in generated.items():+ make_preview(platform, files)+ for platform, files in generated.items():+ print(f'{platform}: {len(files)} icons')+ for path in files:+ image = Image.open(path)+ corner = image.convert('RGBA').getpixel((0, 0))+ print(f' {path.relative_to(ROOT)} {image.size} {image.mode} corner={corner}')+ print(f'preview: {PREVIEW}')++if __name__ == '__main__':+ main()