prole/prole-app
chrisfu 64455fa886 ### Milestone: Remove IRCKit, migrate to swift-nio IRC, enable RoyalVNC via SwiftPM, and fix runtime embedding
- Replaced all IRCKit (0.16) usage with NozeIO `swift-nio-irc-client` (SwiftPM).
- Enabled IRC window with new client: connects and joins `#prole` (plain TCP for now; SSL checkbox displays a notice).
- Enabled RoyalVNC and removed all optional/flag-based handling. Integrated RoyalVNC via SwiftPM (`royalvnc` on `main`).
- Updated VNC UI to current RoyalVNC API: `VNCConnection` + `VNCCAFramebufferView` with a strong delegate reference.
- Simplified build to use SwiftPM for both IRC and RoyalVNC.
- Fixed runtime embedding and loader issues:
  - Copy SwiftPM-built `.dylib` products (e.g., `libRoyalVNCKit.dylib`) into `Contents/Frameworks` and codesign them.
  - Added `@executable_path/../Frameworks` to app rpaths with `install_name_tool`.
- Removed manual RoyalVNCKit `.xcframework` building/embedding and any IRCKit traces.

#### Key changes
- `prole-app/build.sh`:
  - Build app via SwiftPM; removed IRCKit and manual RoyalVNC build logic.
  - Embed SwiftPM `.dylib` outputs into `Contents/Frameworks` and set app rpath.
  - Cleaned usage text; dependencies now handled by SwiftPM.
- `prole-app/Package.swift`:
  - Add `swift-nio-irc-client` (NozeIO) dependency.
  - Add RoyalVNC via SwiftPM: `https://github.com/royalapplications/royalvnc` on `main`.
- `prole-app/Sources/IRCWindowController.swift`:
  - Migrate to NozeIO `IRC` package API; re-enable Connect; join `#prole`.
  - Import AppKit; provide convenience init for transcript view.
- `prole-app/Sources/WorkstationWindowController.swift`:
  - Import `RoyalVNCKit`; use `VNCConnection` + `VNCCAFramebufferView`.
  - Implement `VNCConnectionDelegate` and keep a strong reference to the delegate.
- `prole-app/debug.sh`:
  - Removed IRCKit logs section; kept RoyalVNC logs earlier; then removed manual RoyalVNC altogether.

This build now launches successfully (no dyld errors), opens the Workstation window (RoyalVNC), and the IRC window connects via the new client.

### Suggested follow-ups
- If TLS is required for IRC, add `NIOSSL` integration and wire SSL checkbox to TLS connection.
- Optionally remove leftover Vendor references if any local cache remains.
2025-12-05 23:37:54 -08:00
..
Sources ### Milestone: Remove IRCKit, migrate to swift-nio IRC, enable RoyalVNC via SwiftPM, and fix runtime embedding 2025-12-05 23:37:54 -08:00
build.sh ### Milestone: Remove IRCKit, migrate to swift-nio IRC, enable RoyalVNC via SwiftPM, and fix runtime embedding 2025-12-05 23:37:54 -08:00
debug.sh ### Milestone: Remove IRCKit, migrate to swift-nio IRC, enable RoyalVNC via SwiftPM, and fix runtime embedding 2025-12-05 23:37:54 -08:00
Package.swift ### Milestone: Remove IRCKit, migrate to swift-nio IRC, enable RoyalVNC via SwiftPM, and fix runtime embedding 2025-12-05 23:37:54 -08:00
prole.properties chore(installer): Show 'Prole Installer' name and Prole icon on macOS; read images from properties 2025-12-02 18:52:04 -08:00
README.md ProleStatus: app-window default, light splash restored, status bar controls; endpoint config via properties; build + docs 2025-12-01 21:08:30 -08:00

#####################################################
# ╭───────────────────────────────────────────────╮ #
# │               _     ___ _        _            │ #
# │  _ __ _ _ ___| |___/ __| |_ __ _| |_ _  _ ___ │ #
# │ | '_ \ '_/ _ \ / -_)__ \  _/ _` |  _| || (_-< │ #
# │ | .__/_| \___/_\___|___/\__\__,_|\__|\_,_/__/ │ #
# │ |_|                                           │ #
# ╰───────────────────────────────────────────────╯ #
#####################################################

Prole — macOS status and control surface for Prole endpoints, with a path to an integrated virtual workstation harness.

Overview

  • Prole provides live reachability and latency signals for Prole service endpoints. It operates in two modes: a regular application window for situational awareness and a minimalist statusbar overlay for persistent ataglance status.
  • The application will evolve to include a virtual workstation surface to coordinate work across a network of Prolelinked LLMs. The current scope is operational visibility and control of endpoints.

Supported platform

  • macOS 12.0+ (Monterey or newer) on Apple Silicon (arm64) and Intel (x86_64). Universal builds are supported by the build script.

Execution environment requirements (runtime)

  • No external daemons or brew packages are required to run the built app bundle.
  • Network access to the configured endpoints.

Build environment requirements

  • Xcode Command Line Tools (swiftc, xcrun). Install if needed:
    xcode-select --install
    
  • System tools used by the build:
    • iconutil and sips (for .icns generation)
    • codesign (adhoc signing)
    • plutil (plist formatting, via xcrun if needed)

Repository layout (subset)

  • prole-app/ — macOS app sources and build system
    • Sources/ — Swift sources (AppKit)
    • build.sh — hermetic CLI build producing a .app bundle
    • prole.properties — default endpoint configuration (bundled into Resources)
    • dist/Prole.app — build output

Build script

  • The build is driven by prole-app/build.sh. Typical usage:
    cd prole-app
    ./build.sh build             # build for host arch
    ./build.sh run               # build (if needed) and open the app
    ./build.sh build-universal   # produce a universal (arm64+x86_64) binary
    ./build.sh debug             # run in foreground with verbose logs
    ./build.sh clean             # remove build artifacts
    ./build.sh package           # zip dist/Prole.app into dist/Prole.zip
    

What the script does

  • Compiles all Swift sources with swiftc (AppKit, Carbon, Network frameworks).
  • Generates Contents/Info.plist with LSUIElement=false so the app can present a standard menu when in Application Window mode.
  • Generates an application icon (Prole.icns) and a template status glyph as needed.
  • Copies resources:
    • www/images/prole-type.gifContents/Resources/prole-type.gif (for the startup tip splash)
    • prole-app/prole.propertiesContents/Resources/prole.properties
  • Performs adhoc code signing of the .app bundle.

Alternate build path (installer UI)

  • The repository includes install.py, a Tkinter helper that can orchestrate the build. From the repository root:
    python3 install.py
    
  • Use the “Build Prole macOS app” step. The installer will produce prole-app/dist/Prole.app and can optionally copy it to /Applications.

Run modes and controls

  • Modes:
    • Application Window mode (default): resizable window with three vertical status rows (svc, k3s aggregate, local) and a timestamp in the topright. A small control bar bottomleft exposes Refresh (⟳) and Minimize to Status Bar (_).
    • Status Bar mode: thin overlay aligned with the macOS menu bar; shows a scrolling summary and a 'maximize' button (□) to return to the main window.
  • Toggle between modes with the global shortcut:
    • Cmd+Option+Shift+P
  • Menus:
    • Application menu “Prole” (next to the Apple menu): Show Status Bar / Show Main Window (same toggle as the hotkey), Refresh Now, Quit.
    • Statusbar “P” icon (rightclick): Show/Hide Status Bar Icon, Show/Hide Application Window, Refresh Now, Quit.

Configuration

  • Endpoint configuration is provided via Javastyle key=value properties. Two locations are read at startup; the user override has precedence:
    1. Bundled defaults: Prole.app/Contents/Resources/prole.properties
    2. User override (optional): ~/Library/Application Support/Prole/prole.properties
  • Default keys:
    • svc.host, svc.port
    • k3s.retropie.host, k3s.retropie.port
    • k3s.pi.host, k3s.pi.port
    • k3d.local.host, k3d.local.port
  • Example user override:
    # Override core service endpoint
    svc.host=svc.my-domain.tld
    svc.port=443
    
    # Local k3d on a custom port
    k3d.local.port=6445
    

Operational notes

  • Status checks are TCP connect probes executed on a background timer (default: 30s). Latency is the connection time in milliseconds; failures record a short diagnostic for tooltips.
  • The splash screen is transient (~ 5s) and can be dismissed with a click. It loads prole-type.gif if present in Resources.

Diagnostics & troubleshooting

  • Ensure Xcode CLT is installed if the build fails:
    xcode-select --install
    
  • If the app launches without a standard menu/window, verify Info.plist has LSUIElement=false (the build script sets this). Rebuild using build.sh.
  • If the hotkey appears inactive, bring the app to the foreground or use the Prole menu item (it triggers the same toggle).
  • If status indicators stay red, validate network reachability and adjust prole.properties to endpoints reachable from your host.
  • For adhoc logging, search the sources for dlog("…") and run via ./build.sh debug to watch stdout.

Security & signing

  • The .app bundle is adhoc signed by default. For distribution, replace with a Developer ID signature and notarize as appropriate for your environment.

Roadmap

  • Integration of a virtual workstation to orchestrate a network of Prolelinked LLMs from within the Prole surface.

License

  • See the repository LICENSE file.