Skip to content

Commit 7046fc9

Browse files
authored
Merge pull request #40 from AgoraIO-Community/feat/design-update
Design update, native macOS executor app, release CI, and app-first connect flow
2 parents ee2ead2 + aa3d246 commit 7046fc9

68 files changed

Lines changed: 10521 additions & 296 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish-pypi.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
concurrency:
9+
group: release-${{ github.ref }}
10+
cancel-in-progress: false
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
id-token: write
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: "3.12"
27+
28+
- name: Install release tooling
29+
run: python -m pip install '.[release]'
30+
31+
- name: Derive release version from tag
32+
env:
33+
GITHUB_REF_NAME: ${{ github.ref_name }}
34+
run: |
35+
case "$GITHUB_REF_NAME" in
36+
v?*)
37+
echo "RELEASE_VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
38+
;;
39+
*)
40+
echo "error: expected a tag like v1.2.3, got $GITHUB_REF_NAME" >&2
41+
exit 1
42+
;;
43+
esac
44+
45+
- name: Build and check distributions
46+
run: ./scripts/publish_pypi.sh --dry-run --yes --dist-dir dist --version "$RELEASE_VERSION"
47+
48+
- name: Publish to PyPI
49+
uses: pypa/gh-action-pypi-publish@release/v1
50+
51+
macos:
52+
runs-on: macos-latest
53+
permissions:
54+
contents: write
55+
56+
steps:
57+
- name: Checkout
58+
uses: actions/checkout@v4
59+
60+
- name: Run Core unit tests
61+
run: swift test --package-path macos
62+
63+
- name: Derive release version from tag
64+
env:
65+
GITHUB_REF_NAME: ${{ github.ref_name }}
66+
run: |
67+
case "$GITHUB_REF_NAME" in
68+
v?*)
69+
echo "RELEASE_VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
70+
;;
71+
*)
72+
echo "error: expected a tag like v1.2.3, got $GITHUB_REF_NAME" >&2
73+
exit 1
74+
;;
75+
esac
76+
77+
- name: Install create-dmg
78+
run: brew install create-dmg
79+
80+
- name: Build DMGs (arm64 + x86_64)
81+
run: |
82+
set -euo pipefail
83+
export NEWBRO_APP_VERSION="$RELEASE_VERSION"
84+
mkdir -p macos/release
85+
for ARCH in arm64 x86_64; do
86+
echo "::group::build $ARCH"
87+
NEWBRO_APP_ARCH="$ARCH" ./macos/package-app.sh
88+
STAGE="$(mktemp -d)"
89+
cp -R "macos/dist/Newbro Executor.app" "$STAGE/"
90+
DMG="macos/release/NewbroExecutor-${NEWBRO_APP_VERSION}-${ARCH}.dmg"
91+
rm -f "$DMG"
92+
create-dmg \
93+
--volname "Newbro Executor ${NEWBRO_APP_VERSION}" \
94+
--window-size 540 380 \
95+
--icon-size 128 \
96+
--icon "Newbro Executor.app" 140 190 \
97+
--app-drop-link 400 190 \
98+
--no-internet-enable \
99+
"$DMG" \
100+
"$STAGE"
101+
rm -rf "$STAGE"
102+
echo "::endgroup::"
103+
done
104+
ls -la macos/release
105+
106+
- name: Create GitHub Release
107+
uses: softprops/action-gh-release@v2
108+
with:
109+
files: macos/release/*.dmg
110+
fail_on_unmatched_files: true
111+
body: |
112+
## Newbro Executor (macOS)
113+
114+
Unsigned menu-bar app. On first launch, right-click the app in
115+
`/Applications` and choose **Open** (or run
116+
`xattr -dr com.apple.quarantine "/Applications/Newbro Executor.app"`).
117+
118+
**Downloads** (pick the asset matching your Mac)
119+
- Apple Silicon (M-series): the `-arm64.dmg` asset below
120+
- Intel: the `-x86_64.dmg` asset below

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ newbro.egg-info/
1212
synopse.egg-info/
1313
src/*.egg-info/
1414
.codex
15+
.superpowers/
1516
src/newbro/ui/node_modules/
1617
src/newbro/ui/.vercel/
1718
src/newbro/ui/.vite/

docs/architecture/executors.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ Executor-node note:
4343
- the executor node's Newbro URL is a client-side runtime input passed through
4444
the UI's install/update-and-connect command or run-only
4545
`newbro executor run --base-url ...`, not server-owned node metadata
46+
- a native macOS menu-bar app (SwiftUI, under `macos/`) supervises multiple
47+
executor-node profiles stored in `~/.newbro/menubar.json`. Each profile runs
48+
as an independent `newbro executor run` subprocess; several run concurrently.
49+
The app resolves the installed `newbro` CLI at runtime and only edits
50+
connection profiles — deeper executor runtime config stays owned by
51+
`newbro executor setup`. A rejected `node_id`/`token` shows as a continuous
52+
connecting/retrying state because the node service reconnects unboundedly.
4653
- local executor-family/tool config no longer uses an `executor_node.enabled`
4754
toggle; `newbro executor run` may trigger the same local setup flow when
4855
executor commands or enabled families are missing

docs/memories.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,3 +306,5 @@ Short log of important design decisions and changes for Newbro.
306306
- Split Newbro CLI startup ownership into focused parser, command, config, process, check, status, path, and systemd modules, and added read-only `newbro status` while keeping `newbro dev` backend/frontend-only and leaving executor nodes explicit.
307307
- Added first-class Codex goal/plan projection: Codex goals come from `thread/goal/get` and goal events, Codex plans come from documented plan events/items, plan state is stored separately from progress, and reasoning items stay hidden from Bro Detail timeline cards.
308308
- Changed the VPS Docker deployment workflow to prune stopped containers and unused images before pulling/updating Compose, then prune unused images again after start so replaced app images do not accumulate; volumes are not pruned.
309+
- Added a macOS menu-bar app (`newbro executor ui`, `macos-ui` extra) that supervises multiple concurrent executor-node profiles from `~/.newbro/menubar.json`, spawning one `newbro executor run` subprocess per active profile. It is a supervisor + connection-profile editor only; `newbro executor setup` still owns executor binary/audio config.
310+
- Replaced the Python rumps macOS menu-bar executor app with a native SwiftUI app under `macos/` (Swift package: `NewbroExecutorCore` logic + `NewbroExecutor` app). It supervises multiple concurrent `newbro executor run` profiles from `~/.newbro/menubar.json`, resolves the installed `newbro` CLI at runtime (`~/.local/bin/newbro`), and self-heals via the public `install-newbro-cli.sh`.

0 commit comments

Comments
 (0)