mirror of
https://github.com/saymrwulf/BraiinsRatchet.git
synced 2026-11-21 06:43:11 +00:00
Replace Mac app with Tahoe Liquid Glass flight deck
This commit is contained in:
parent
9750530b63
commit
fd9e7df350
9 changed files with 855 additions and 1151 deletions
10
README.md
10
README.md
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
Monitor-only research scaffold for optimizing a manual "buy hashpower on Braiins, mine through OCEAN" strategy.
|
Monitor-only research scaffold for optimizing a manual "buy hashpower on Braiins, mine through OCEAN" strategy.
|
||||||
|
|
||||||
The first implementation is deliberately conservative:
|
The current implementation is monitor-only by design:
|
||||||
|
|
||||||
- The code never places, modifies, or cancels Braiins orders.
|
- The code never places, modifies, or cancels Braiins orders.
|
||||||
- The default strategy emits recommendations only.
|
- The default strategy emits recommendations only.
|
||||||
|
|
@ -10,7 +10,7 @@ The first implementation is deliberately conservative:
|
||||||
- The Braiins integration accepts a watcher-only token only.
|
- The Braiins integration accepts a watcher-only token only.
|
||||||
- All mutable runtime state stays inside this repository under `data/`.
|
- All mutable runtime state stays inside this repository under `data/`.
|
||||||
- The Git branch is `master`.
|
- The Git branch is `master`.
|
||||||
- The project uses Python standard library only.
|
- The lifecycle engine uses Python standard library only; the native Mac app is SwiftUI.
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
|
|
@ -18,7 +18,7 @@ The first implementation is deliberately conservative:
|
||||||
./scripts/ratchet app
|
./scripts/ratchet app
|
||||||
```
|
```
|
||||||
|
|
||||||
This builds and opens the native macOS control room. Use the app for normal operation; terminal commands are advanced fallback tools.
|
This rebuilds the native macOS control room, replaces any stale app window, and opens the fresh bundle. Use the app for normal operation; terminal commands are advanced fallback tools.
|
||||||
|
|
||||||
The lifecycle state persists in `data/ratchet.sqlite`. If the app or Mac restarts, open the app again and it reads the same state.
|
The lifecycle state persists in `data/ratchet.sqlite`. If the app or Mac restarts, open the app again and it reads the same state.
|
||||||
|
|
||||||
|
|
@ -42,9 +42,9 @@ For the native macOS app:
|
||||||
./scripts/ratchet app
|
./scripts/ratchet app
|
||||||
```
|
```
|
||||||
|
|
||||||
This builds `macos/build/Braiins Ratchet.app` and opens the real app bundle. Do not use `swift run` for normal operation.
|
This builds `macos/build/Braiins Ratchet.app`, closes any stale `BraiinsRatchetMac` UI process, and opens the real app bundle. Do not use `swift run` for normal operation.
|
||||||
|
|
||||||
The app is a native visual control room: Mission Control, Mining Stack, Ratchet, Strategy Lab, Manual Exposure, and Evidence Vault. The design rationale is in `docs/APP_DESIGN_RESEARCH.md`.
|
The app is a native Tahoe Flight Deck: animated hashfield background, real SwiftUI Liquid Glass controls, Hashflow, Ratchet, Bid Lab, Exposure, and Evidence. The design rationale is in `docs/APP_DESIGN_RESEARCH.md`.
|
||||||
|
|
||||||
Advanced fallback for a 6-hour CLI monitoring session:
|
Advanced fallback for a 6-hour CLI monitoring session:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,11 @@ Your job is not to understand every metric.
|
||||||
Your job is:
|
Your job is:
|
||||||
|
|
||||||
1. Open the app with `./scripts/ratchet app`.
|
1. Open the app with `./scripts/ratchet app`.
|
||||||
2. Stay on `Mission Control` unless you intentionally need another tab.
|
2. Stay on `Flight Deck` unless you intentionally need another tab.
|
||||||
3. Read `Current Decision` first.
|
3. Read the giant decision word first.
|
||||||
4. Read `Who Owns Control` second.
|
4. Read the glass `control` and `next` pucks second.
|
||||||
5. Prefer `Start Forever Engine` when you want the app to keep the monitor-only lifecycle moving without babysitting.
|
5. Prefer `Start Forever Engine` when you want the app to keep the monitor-only lifecycle moving without babysitting.
|
||||||
6. If you manually place a Braiins canary, record it in `Manual Exposure` immediately.
|
6. If you manually place a Braiins canary, record it in `Exposure` immediately.
|
||||||
|
|
||||||
Do not start extra terminal watches while the app says a watch, cooldown, or manual exposure owns control.
|
Do not start extra terminal watches while the app says a watch, cooldown, or manual exposure owns control.
|
||||||
|
|
||||||
|
|
@ -66,14 +66,16 @@ Build and open the real app bundle:
|
||||||
|
|
||||||
This creates `macos/build/Braiins Ratchet.app`. After that, you can open that app bundle directly from Finder or pin it in the Dock.
|
This creates `macos/build/Braiins Ratchet.app`. After that, you can open that app bundle directly from Finder or pin it in the Dock.
|
||||||
|
|
||||||
|
The launcher rebuilds the app and replaces any already-running `BraiinsRatchetMac` UI process before opening the bundle. That prevents macOS from simply focusing an old window after a redesign.
|
||||||
|
|
||||||
The app is organized as:
|
The app is organized as:
|
||||||
|
|
||||||
1. `Mission Control`: current decision, control ownership, forever engine controls, cooldown progress, and evidence.
|
1. `Flight Deck`: giant decision word, glass control pucks, reactor lens, engine controls, and key instruments.
|
||||||
2. `Mining Stack`: the Umbrel, Knots, Datum, OCEAN, and Braiins interplay.
|
2. `Hashflow`: the Umbrel, Knots, Datum, OCEAN, and Braiins interplay.
|
||||||
3. `Ratchet`: the observe, price, watch, mature, adapt learning loop.
|
3. `Ratchet`: the observe, price, watch, mature, adapt learning loop.
|
||||||
4. `Strategy Lab`: shadow order, expected net, breakeven, and loss boundary.
|
4. `Bid Lab`: shadow order, expected net, breakeven, and loss boundary.
|
||||||
5. `Manual Exposure`: record or close manually executed Braiins exposure.
|
5. `Exposure`: record or close manually executed Braiins exposure.
|
||||||
6. `Evidence Vault`: raw cockpit, report, and ledger artifacts for diagnostics.
|
6. `Evidence`: raw cockpit, report, and ledger artifacts for diagnostics.
|
||||||
|
|
||||||
## Research Pathway
|
## Research Pathway
|
||||||
|
|
||||||
|
|
@ -107,7 +109,7 @@ Each completed watch creates one run report:
|
||||||
reports/run-*.md
|
reports/run-*.md
|
||||||
```
|
```
|
||||||
|
|
||||||
Use the app's `Evidence Vault` tab when you need raw artifacts. Mission Control intentionally hides raw logs during normal operation.
|
Use the app's `Evidence` tab when you need raw artifacts. Flight Deck intentionally hides raw logs during normal operation.
|
||||||
|
|
||||||
## Advanced Fallback Commands
|
## Advanced Fallback Commands
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,14 +50,16 @@ The native app now treats the Python engine as a structured state provider, not
|
||||||
- Cockpit text for audit/debug.
|
- Cockpit text for audit/debug.
|
||||||
- Latest OCEAN, Braiins, and strategy proposal payloads.
|
- Latest OCEAN, Braiins, and strategy proposal payloads.
|
||||||
|
|
||||||
The SwiftUI app turns that into native surfaces:
|
The SwiftUI app turns that into native Tahoe surfaces:
|
||||||
|
|
||||||
- `Mission Control`: current decision, control ownership, forever engine, cooldown, and evidence.
|
- `Flight Deck`: giant decision word, glass control pucks, reactor lens, engine controls, and key instruments.
|
||||||
- `Mining Stack`: Umbrel, Knots, Datum, OCEAN, Braiins, and block-luck interplay.
|
- `Hashflow`: Umbrel, Knots, Datum, OCEAN, Braiins, and block-luck interplay.
|
||||||
- `Ratchet`: the observe, price, watch, mature, adapt pathway.
|
- `Ratchet`: the observe, price, watch, mature, adapt pathway.
|
||||||
- `Strategy Lab`: shadow order, expected net, breakeven, and loss boundary.
|
- `Bid Lab`: shadow order, expected net, breakeven, and loss boundary.
|
||||||
- `Manual Exposure`: the ledger for real manually placed Braiins exposure.
|
- `Exposure`: the ledger for real manually placed Braiins exposure.
|
||||||
- `Evidence Vault`: raw artifacts kept available but no longer primary.
|
- `Evidence`: raw artifacts kept available but no longer primary.
|
||||||
|
|
||||||
|
The UI uses real Tahoe SwiftUI APIs where available in the local SDK: `glassEffect`, `GlassEffectContainer`, `.glass`, `.glassProminent`, `backgroundExtensionEffect`, and toolbar search. These are intentionally concentrated on the shell, action controls, and reactor instruments instead of coating every paragraph in glass.
|
||||||
|
|
||||||
## The Ratchet UX Rule
|
## The Ratchet UX Rule
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
// swift-tools-version: 6.0
|
// swift-tools-version: 6.2
|
||||||
|
|
||||||
import PackageDescription
|
import PackageDescription
|
||||||
|
|
||||||
let package = Package(
|
let package = Package(
|
||||||
name: "BraiinsRatchetMac",
|
name: "BraiinsRatchetMac",
|
||||||
platforms: [
|
platforms: [
|
||||||
.macOS(.v15)
|
.macOS(.v26)
|
||||||
],
|
],
|
||||||
products: [
|
products: [
|
||||||
.executable(name: "BraiinsRatchetMac", targets: ["BraiinsRatchetMac"])
|
.executable(name: "BraiinsRatchetMac", targets: ["BraiinsRatchetMac"])
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
Native SwiftUI control room for the durable Braiins Ratchet lifecycle engine.
|
Native SwiftUI control room for the durable Braiins Ratchet lifecycle engine.
|
||||||
|
|
||||||
The Python lifecycle engine remains the source of truth. This app reads the same repository-local SQLite state through structured app state, not by making Mission Control a terminal transcript.
|
The Python lifecycle engine remains the source of truth. This app reads the same repository-local SQLite state through structured app state, not by making the Flight Deck a terminal transcript.
|
||||||
|
|
||||||
## Normal Run
|
## Normal Run
|
||||||
|
|
||||||
|
|
@ -10,18 +10,18 @@ The Python lifecycle engine remains the source of truth. This app reads the same
|
||||||
./scripts/ratchet app
|
./scripts/ratchet app
|
||||||
```
|
```
|
||||||
|
|
||||||
This builds `macos/build/Braiins Ratchet.app` and opens the packaged app. Use this path for normal operation.
|
This builds `macos/build/Braiins Ratchet.app`, closes any stale `BraiinsRatchetMac` UI process, and opens the fresh packaged app. Use this path for normal operation.
|
||||||
|
|
||||||
## Current Scope
|
## Current Scope
|
||||||
|
|
||||||
- Native macOS SwiftUI control room.
|
- Native macOS Tahoe SwiftUI Flight Deck.
|
||||||
- Mission Control with one explicit decision and control owner.
|
- Real Liquid Glass APIs: `glassEffect`, `GlassEffectContainer`, `.glass`, `.glassProminent`, toolbar search, and `backgroundExtensionEffect`.
|
||||||
- Mining Stack view for Umbrel, Knots, Datum, OCEAN, and Braiins interplay.
|
- Hashflow view for Umbrel, Knots, Datum, OCEAN, and Braiins interplay.
|
||||||
- Ratchet view for the full autoresearch pathway.
|
- Ratchet view for the full autoresearch pathway.
|
||||||
- Strategy Lab for shadow orders and loss boundaries.
|
- Bid Lab for shadow orders and loss boundaries.
|
||||||
- Forever Engine controls for the monitor-only background lifecycle.
|
- Forever Engine controls for the monitor-only background lifecycle.
|
||||||
- Manual exposure recording and closing controls.
|
- Manual exposure recording and closing controls.
|
||||||
- Evidence Vault for raw artifacts and backend diagnostics.
|
- Evidence view for raw artifacts and backend diagnostics.
|
||||||
- Monitor-only. It never places Braiins orders.
|
- Monitor-only. It never places Braiins orders.
|
||||||
|
|
||||||
## Product Direction
|
## Product Direction
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -66,7 +66,7 @@ cat > "$CONTENTS_DIR/Info.plist" <<'PLIST'
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1</string>
|
<string>1</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>15.0</string>
|
<string>26.0</string>
|
||||||
<key>NSHighResolutionCapable</key>
|
<key>NSHighResolutionCapable</key>
|
||||||
<true/>
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,7 @@ cmd_app() {
|
||||||
local app_path
|
local app_path
|
||||||
app_path="$("$ROOT_DIR/scripts/build_mac_app" | tail -n 1)"
|
app_path="$("$ROOT_DIR/scripts/build_mac_app" | tail -n 1)"
|
||||||
echo "Opening $app_path"
|
echo "Opening $app_path"
|
||||||
|
pkill -x BraiinsRatchetMac 2>/dev/null || true
|
||||||
open "$app_path"
|
open "$app_path"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ class MacAppPackagingTest(unittest.TestCase):
|
||||||
self.assertIn("cmd_app", text)
|
self.assertIn("cmd_app", text)
|
||||||
self.assertIn("app-state", text)
|
self.assertIn("app-state", text)
|
||||||
self.assertIn("engine", text)
|
self.assertIn("engine", text)
|
||||||
|
self.assertIn("pkill -x BraiinsRatchetMac", text)
|
||||||
self.assertNotIn("swift run BraiinsRatchetMac", text)
|
self.assertNotIn("swift run BraiinsRatchetMac", text)
|
||||||
|
|
||||||
def test_python_cli_exposes_structured_app_state(self):
|
def test_python_cli_exposes_structured_app_state(self):
|
||||||
|
|
@ -35,8 +36,17 @@ class MacAppPackagingTest(unittest.TestCase):
|
||||||
self.assertIn("CFBundlePackageType", text)
|
self.assertIn("CFBundlePackageType", text)
|
||||||
self.assertIn("APPL", text)
|
self.assertIn("APPL", text)
|
||||||
self.assertIn("CFBundleIconFile", text)
|
self.assertIn("CFBundleIconFile", text)
|
||||||
|
self.assertIn("<key>LSMinimumSystemVersion</key>", text)
|
||||||
|
self.assertIn("<string>26.0</string>", text)
|
||||||
self.assertIn("iconutil -c icns", text)
|
self.assertIn("iconutil -c icns", text)
|
||||||
|
|
||||||
|
def test_native_app_targets_tahoe_sdk(self):
|
||||||
|
manifest = ROOT / "macos" / "BraiinsRatchet" / "Package.swift"
|
||||||
|
text = manifest.read_text()
|
||||||
|
|
||||||
|
self.assertIn("swift-tools-version: 6.2", text)
|
||||||
|
self.assertIn(".macOS(.v26)", text)
|
||||||
|
|
||||||
def test_native_app_docs_use_packaged_launcher(self):
|
def test_native_app_docs_use_packaged_launcher(self):
|
||||||
docs = [
|
docs = [
|
||||||
ROOT / "README.md",
|
ROOT / "README.md",
|
||||||
|
|
@ -55,11 +65,12 @@ class MacAppPackagingTest(unittest.TestCase):
|
||||||
self.assertIn("This project now has one normal operator entry point", text)
|
self.assertIn("This project now has one normal operator entry point", text)
|
||||||
self.assertIn("./scripts/ratchet app", text)
|
self.assertIn("./scripts/ratchet app", text)
|
||||||
self.assertIn("The app is the control room", text)
|
self.assertIn("The app is the control room", text)
|
||||||
|
self.assertIn("Flight Deck", text)
|
||||||
self.assertIn("Who Owns Control", text)
|
self.assertIn("Who Owns Control", text)
|
||||||
self.assertIn("Start Forever Engine", text)
|
self.assertIn("Start Forever Engine", text)
|
||||||
self.assertIn("Mining Stack", text)
|
self.assertIn("Hashflow", text)
|
||||||
self.assertIn("Strategy Lab", text)
|
self.assertIn("Bid Lab", text)
|
||||||
self.assertIn("Evidence Vault", text)
|
self.assertIn("Evidence", text)
|
||||||
self.assertNotIn("Controlled Automation", text)
|
self.assertNotIn("Controlled Automation", text)
|
||||||
self.assertNotIn("./scripts/ratchet pipeline", text)
|
self.assertNotIn("./scripts/ratchet pipeline", text)
|
||||||
|
|
||||||
|
|
@ -68,19 +79,28 @@ class MacAppPackagingTest(unittest.TestCase):
|
||||||
text = source.read_text()
|
text = source.read_text()
|
||||||
|
|
||||||
self.assertIn("NavigationSplitView", text)
|
self.assertIn("NavigationSplitView", text)
|
||||||
self.assertIn("MissionControlView", text)
|
self.assertIn("FlightDeckApp", text)
|
||||||
self.assertIn("MiningStackView", text)
|
self.assertIn("FlightDeckView", text)
|
||||||
self.assertIn("RatchetPathView", text)
|
self.assertIn("HashfieldBackdrop", text)
|
||||||
self.assertIn("StrategyLabView", text)
|
self.assertIn("ReactorLens", text)
|
||||||
|
self.assertIn("HashflowView", text)
|
||||||
|
self.assertIn("RatchetMapView", text)
|
||||||
|
self.assertIn("BidLabView", text)
|
||||||
self.assertIn("EvidenceVaultView", text)
|
self.assertIn("EvidenceVaultView", text)
|
||||||
self.assertIn("AppStatePayload", text)
|
self.assertIn("AppStatePayload", text)
|
||||||
self.assertIn("EngineStatusPayload", text)
|
self.assertIn("EngineStatusPayload", text)
|
||||||
self.assertIn("loadAppState", text)
|
self.assertIn("loadAppState", text)
|
||||||
self.assertIn("Start Forever Engine", text)
|
self.assertIn("Start Forever Engine", text)
|
||||||
self.assertIn("Who Owns Control", text)
|
self.assertIn("glassEffect", text)
|
||||||
self.assertIn("Mining Stack", text)
|
self.assertIn("GlassEffectContainer", text)
|
||||||
self.assertIn("Strategy Lab", text)
|
self.assertIn(".buttonStyle(.glass", text)
|
||||||
self.assertIn("Current Decision", text)
|
self.assertIn("backgroundExtensionEffect", text)
|
||||||
|
self.assertIn("searchable", text)
|
||||||
|
self.assertIn("Flight Deck", text)
|
||||||
|
self.assertIn("Bid Lab", text)
|
||||||
|
self.assertNotIn("MissionControlView", text)
|
||||||
|
self.assertNotIn("MiningStackView", text)
|
||||||
|
self.assertNotIn("StrategyLabView", text)
|
||||||
self.assertNotIn("Do This Now", text)
|
self.assertNotIn("Do This Now", text)
|
||||||
self.assertNotIn("Automation Gate", text)
|
self.assertNotIn("Automation Gate", text)
|
||||||
self.assertNotIn("confirmationDialog", text)
|
self.assertNotIn("confirmationDialog", text)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue