Skip to content
C.W.K.
Stream
Lesson 01 of 04 · published

The Engine Opens No Port

~11 min · mac, portless, projection

Level 0Cold Stick
0 XP0/41 lessons0/14 achievements
0/100 XP to next level100 XP to go0% complete

A Window Is Not a Server

The Mac app is a projector over the same engine the terminal already runs. The engine process opens no listening socket. It is a child: one workspace, one record, one stdio pipe. A local HTTP server 'so the UI can attach' would be a second product and a second attacker surface. Family work already has enough listeners. This one stays a program.

The host is native — SwiftUI and AppKit own lifecycle, permissions, and Apple integration. The renderer is a guest. The Python engine remains the sole owner of the loop, the tools, the record, and workspace mutation. No client database or reducer may become authoritative. If the window dies, the notebook is still on disk. If the engine dies, the window recovers from the notebook. Neither direction invents a second loop.

No port is the Mac form of vendor-zero. A local server is a vendor you installed on yourself. The child is a process you can kill.

No Bundled Interpreter

The signed app launches a Conda child. It does not ship a private Python tree inside the bundle. A private tree would drift from the cleanroom interpreter the CLI already proved. Swift packaging and signing live in swift-quest. Here the rule is smaller: the projector does not become a second runtime.

Code

Three processes, one authority·text
HOST       native lifecycle, permissions, no engine logic
RENDERER   paints the fold; never authorizes a tool
ENGINE     child process; loop, tools, record; no listener

If you need a URL to talk to the engine, you built a server.

External links

Exercise

Name a coding UI that talks to its engine over localhost. Write the failure that becomes possible the moment that socket exists. Firebrand's Mac answer is: do not open it.
Hint
The failure is usually an extra client you did not review, or a token that now has a door.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.