Repository navigation
Description
Goal
Core's desktop app, daemon, CLI and installer stop branching on a Pro edition (ADR-081, proposed: core ships no Pro code).
- What a product supplies comes in as a
DaemonProfile. That is its daemon binary name, extra service environment and product name, passed through the app-builder hook (ADR-082 §3.6, proposed). - Core and the Pro app share one daemon service identity, guarded by a single-instance lock.
- Core's installer, Homebrew cask and CLI recognise another NodeSpace product from static bundle data (ADR-084 decisions 2 and 5, proposed).
Pro branching in core today (main @ af8ddb6)
Locate code by symbol. Line numbers are hints only: they shift once #3322's library split (ADR-082 §3.1) moves the src-tauri/src modules into the library package.
- Desktop app,
daemon_setup.rs:is_pro_build(), which isoption_env!("NODESPACE_PRO_SUPABASE_URL").is_some(), plusPRO_SUPABASE_URLandPRO_ANON_KEY;PRO_DAEMON_BINARY_NAMEanddaemon_binary_name_for;- the
.prolaunchd labels inlaunch_agent_label; - the Pro socket in
daemon_socket_relativeand the Pro UI pid file inui_pid_relative; - the Windows image name in
daemon_image_name_for; - the Supabase env in
write_plist'spro_envblock.
- Desktop app, elsewhere:
- the Pro socket in
services/grpc_client.rsresolve_socket_path; - the Pro marker in
incompatible_database.rsmarker_path_in; tauri.pro.conf.json, the overlay sync passes to core'stauri build.
- the Pro socket in
packages/daemon:- an unused
procargo feature; is_pro_build(),edition()and--editioninsrc/main.rs;cfg!(feature = "pro")insrc/tray.rs;- the public
incompatible_database::marker_path(is_pro).
- an unused
packages/proto/src/socket.rs: 4-way(is_debug, is_pro)tables for sockets, UI pid files and markers.packages/cli:- Pro-socket discovery in
discover_socket_in, and its--sockethelp, which is regenerated intopackages/skill/references/cli.md; - Pro-socket removal in
uninstall::remove_sock.
- Pro-socket discovery in
scripts/pkg-resources/postinstall: a Pro guard that runsnodespaced --editionas root after the payload is written. It never fires.
Constraints that shape the plan
- The Pro GUI builds from core HEAD today.
- sync's
build-pro-dmg.shandrelease.ymlcheck out core with no ref, setNODESPACE_PRO_*and pass--config src-tauri/tauri.pro.conf.json. - So every Remove Pro edition branching from the core app, daemon, CLI and installer #3357 change that the Pro GUI build consumes waits for the canonical pin gate,
SYNC:Pro GUI and Pro daemon build from one pinned core rev. - Once that gate is met, core merges first, and nodespace-sync adapts in the PR that moves its pin past the change (ADR-083 §7).
- sync's
- The Pro daemon is already pinned.
nodespaced-pro/Cargo.tomlpins rev680c35d8, and linksnodespace-daemonwithout theprofeature.- The only daemon-library API from this list that it calls is
incompatible_database::marker_path(true)(syncnodespaced-pro/src/main.rs:543). - Collapse proto socket, pid and marker tables to debug/release; drop CLI Pro discovery #3355 changes that signature, and sync adapts at its next pin bump. That is the caller-supplied replacement ADR-082 §4 describes.
nodespacedignores unknown arguments and starts serving. Once--editionis gone, anything that runsnodespaced --editionas root inside$(...)would start a daemon and hang. So Remove the pro feature and --edition from nodespaced and reject unknown arguments #3348 rejects unknown arguments in the same PR that removes the flag.- Identity is not part of the profile.
- ADR-082 §3.6 gives
DaemonProfileonlybinary_name,service_envandproduct. - Under ADR-084 decision 2(a), both products use core's launchd label, socket, UI pid file and marker.
- So the Pro label, socket, pid and marker selections stay behind
is_pro_build()until Delete the in-core Pro daemon profile, NODESPACE_PRO_* switch and tauri.pro.conf.json #3354 deletes them. They do not become profile fields. - The daemon's arguments are not a profile field either. ADR-084 §4.2 makes accepting core's launcher arguments the daemon's job, and Add a single-instance daemon lock and export the launcher's argument list #3352 exports the list.
- ADR-082 §3.6 gives
- After every sub-issue, core builds, all core tests pass, and the free app behaves as before. The exceptions are the ADR-084 behaviours a sub-issue adds on purpose, each named in that issue: the installer, cask and CLI guards, the zap list, the lock, and the product check.
- The Guardrail: stop new Pro code from landing in core #3302 ratchet.
- Every sub-issue runs
bun run scripts/check-pro-boundary.tsand pastes the printedBASELINES. - A test that must name a retired Pro string builds it from fragments (Guardrail: stop new Pro code from landing in core #3302's absence-test convention).
- ADR-084 §5 names three core files that may recognise another product:
scripts/pkg-resources/preinstall,scripts/build-pkg.shandscripts/update-homebrew-cask.ts. They get per-file, per-marker exemptions, commented with that reason.
- Every sub-issue runs
Sub-issues
| Key | Title | Size | Direct dependencies |
|---|---|---|---|
| #3346 | Add a DaemonProfile for the app's daemon binary and service env | M | NodeSpaceAI/nodespace-docs#90 (ADR-082), #3299 |
| #3347 | Let an app built on core supply its DaemonProfile via AppExtensions::daemon_profile | S | #3346, #3306 |
| #3348 | Remove the pro feature and --edition from nodespaced; reject unknown arguments | M | NodeSpaceAI/nodespace-docs#90 (ADR-082), #3299 |
| #3349 | Move the .pkg guard to a static pre-install check; declare NodeSpaceProduct | M | NodeSpaceAI/nodespace-docs#94 (ADR-084), #3299, pin gate |
| #3354 | Delete the in-core Pro daemon profile, NODESPACE_PRO_* switch and tauri.pro.conf.json | M | #3347, #3323, NodeSpaceAI/nodespace-docs#94 (ADR-084), pin gate |
| #3355 | Collapse the proto socket/pid/marker tables to debug/release; drop CLI Pro discovery | M | #3348, #3354, NodeSpaceAI/nodespace-docs#94 (ADR-084), shared-socket gate |
| #3350 | Homebrew cask preflight; keep databases out of zap | S | NodeSpaceAI/nodespace-docs#94 (ADR-084), #3299 |
| #3351 | nodespace uninstall refuses a non-community app | S | #3349, NodeSpaceAI/nodespace-docs#94 (ADR-084) |
| #3352 | Single-instance daemon lock; export the launcher's argument list | M | #3348, NodeSpaceAI/nodespace-docs#94 (ADR-084) |
| #3353 | Product check: the running daemon's executable vs the app's DaemonProfile | M | #3346, #3352, NodeSpaceAI/nodespace-docs#94 (ADR-084), pin gate |
| #3356 | Notices for another product's running or machine-wide daemon | M | #3353 |
#3354 (delete tauri.pro.conf.json) is merged into #3354. Both waited on the same gate, and under ADR-082 §1 the overlay moves into nodespace-sync with the Pro app crate.
Order:
- Once their ADRs and Add the Pro-boundary ratchet check and the CLAUDE.md Pro/sync placement rule #3299 are in: Add a DaemonProfile for the app's daemon binary and service env (no behavior change) #3346, Remove the pro feature and --edition from nodespaced and reject unknown arguments #3348 and Add a Homebrew cask preflight for other NodeSpace products; keep databases out of zap #3350.
- Next: Let an app built on core supply its DaemonProfile via AppExtensions::daemon_profile #3347 (after Route the desktop app through run(extensions, context) with no extensions in core #3306), Add a single-instance daemon lock and export the launcher's argument list #3352 (after Remove the pro feature and --edition from nodespaced and reject unknown arguments #3348), and Move the .pkg guard to a static pre-install check and declare NodeSpaceProduct #3349 (once the pin gate is met).
- Then: Make nodespace uninstall refuse when the installed app is not the free NodeSpace #3351 (after Move the .pkg guard to a static pre-install check and declare NodeSpaceProduct #3349), Delete the in-core Pro daemon profile, NODESPACE_PRO_* switch and tauri.pro.conf.json #3354 (after Let an app built on core supply its DaemonProfile via AppExtensions::daemon_profile #3347, Delete the Pro arm of core's built-in update source and its worker parsing #3323 and the pin gate), and Check the running daemon's executable against the app's DaemonProfile at startup #3353 (after Add a single-instance daemon lock and export the launcher's argument list #3352 and the pin gate).
- Last: Collapse proto socket, pid and marker tables to debug/release; drop CLI Pro discovery #3355 (after Delete the in-core Pro daemon profile, NODESPACE_PRO_* switch and tauri.pro.conf.json #3354 and the shared-socket gate) and Tell the user when another NodeSpace product's daemon is running or registered #3356 (after Check the running daemon's executable against the app's DaemonProfile at startup #3353).
The blockers listed on this parent stay on the parent. Never copy them onto the sub-issues: each sub-issue lists its own direct dependencies.
SYNC gates (nodespace-sync items, filed later)
SYNC:Pro GUI and Pro daemon build from one pinned core rev. This is the canonical pin gate, shared with Move the Pro Tauri layer out of core: pro_* commands, ProClient, proto, update source #3336 through Move Pro-owned data out of core's data model (ADR-083) #3345, and it gates Move the .pkg guard to a static pre-install check and declare NodeSpaceProduct #3349, Delete the in-core Pro daemon profile, NODESPACE_PRO_* switch and tauri.pro.conf.json #3354 and Check the running daemon's executable against the app's DaemonProfile at startup #3353. After it, sync adapts in each pin-bump PR:- Past Move the .pkg guard to a static pre-install check and declare NodeSpaceProduct #3349: the Pro bundle overrides
NodeSpaceProductwithpro. - Past Delete the in-core Pro daemon profile, NODESPACE_PRO_* switch and tauri.pro.conf.json #3354: the Pro app crate passes
AppExtensions::daemon_profile(..)(binarynodespaced-proplus the Supabase env) and owns its Tauri config overlay (ADR-082 §1). It also moves to the shared label and socket, and removes the legacy.proregistrations (ADR-084 §3.3). - Past Collapse proto socket, pid and marker tables to debug/release; drop CLI Pro discovery #3355:
nodespaced-procallsmarker_path(). - Past Add a single-instance daemon lock and export the launcher's argument list #3352:
nodespaced-protakes the lock, and its tests parseLAUNCHER_ARGS.
- Past Move the .pkg guard to a static pre-install check and declare NodeSpaceProduct #3349: the Pro bundle overrides
SYNC:Released Pro builds serve the shared daemon socket daemon.sock (ADR-084 shared service identity). This gates Collapse proto socket, pid and marker tables to debug/release; drop CLI Pro discovery #3355. Under ADR-084 decision 2(a), a Pro daemon on the canonical socket is what lets core's CLI reach it without Pro discovery.
These two gates replace the earlier SYNC:profile, SYNC:overlay, SYNC:cli and SYNC:marker gates.
Findings for the sync owner (not fixed in core)
- The Pro daemon likely fails to start. This is inferred from code, not run.
- Every launcher has passed
--traysince 2026-09-28, andnodespaced-pro's clapArgshas no--tray. It would exit 2, and launchd would respawn it in a loop. - ADR-084 §4.2 item 1 puts the fix in sync: accept every launcher argument. Add a single-instance daemon lock and export the launcher's argument list #3352 exports the list.
- Every launcher has passed
- Pro builds likely ship without the bundled skill.
tauri.pro.conf.jsonrestatesexternalBinandresources, and a JSON merge replaces arrays whole (ADR-082 §1). - Other stale paths in sync:
build-pro-dmg.sh:157-174checks a deadContents/Resources/binariespath;- nothing reads
ui-pro.pid; - the Supabase env reaches the launchd plist only.
- sync's Pro postinstall probes
nodespaced --edition. After Remove the pro feature and --edition from nodespaced and reject unknown arguments #3348, that probe exits 2 and readsunknown, which is harmless.
Acceptance criteria
<#3357 paths> below stands for:
packages/proto packages/cli packages/skill/references/cli.md packages/daemon/Cargo.toml packages/daemon/src/main.rs packages/daemon/src/tray.rs packages/daemon/src/incompatible_database.rs packages/desktop-app/src-tauri/src/daemon_setup.rs packages/desktop-app/src-tauri/src/daemon_profile.rs packages/desktop-app/src-tauri/src/incompatible_database.rs packages/desktop-app/src-tauri/src/constants.rs packages/desktop-app/src-tauri/src/update_check.rs packages/desktop-app/src-tauri/src/services/grpc_client.rs packages/desktop-app/src-tauri/tauri.conf.json scripts/pkg-resources .github
Pro prose in files that #3336, #3362 or #3372 own is out of scope for these greps.
- Every sub-issue is merged.
- Both of these print nothing:
git grep -nw -e is_pro -e is_pro_build -- <#3357 paths>git grep -n -F -e NODESPACE_PRO_ -e NODESPACED_PRO_ -e PRO_DAEMON_BINARY_NAME -e daemon-pro.sock -e daemon-dev-pro.sock -e ui-pro.pid -e ui-dev-pro.pid -e incompatible-database-pro -e incompatible-database-dev-pro -e app.nodespace.daemon.pro -e app.nodespace.daemon.dev.pro -e tauri.pro.conf -e 'feature = "pro"' -- <#3357 paths>
-
git grep -n -F -e --edition -- packages scripts .githubprints nothing. -
git grep -n -F -e nodespaced-pro -e FORCE_COMMUNITY -- <#3357 paths> scripts/build-pkg.sh scripts/update-homebrew-cask.ts scripts/update-homebrew-cask.test.tsprints lines only in the sanctioned ADR-084 recognition points:scripts/pkg-resources/preinstall;scripts/build-pkg.sh;scripts/update-homebrew-cask.ts, with its rendered-cask test fixture.
-
packages/desktop-app/src-tauri/tauri.pro.conf.jsonis deleted. -
AppExtensions::none()yieldsDaemonProfile::community(), and an app built on core supplies its own profile throughAppExtensions::daemon_profile. -
nodespacedexits 2 on unknown arguments. It takes the single-instance lock, and exits 0 when another daemon holds it. -
LAUNCHER_ARGSis exported, and the community daemon's tests parse it. -
nodespace_proto::sockethas only a debug/release axis. - Core's app declares
NodeSpaceProduct = community. - Core refuses to replace or remove another product at every entry point:
- the
.pkgrefuses, with theNODESPACE_FORCE_COMMUNITYoverride; - the cask's preflight refuses;
nodespace uninstallrefuses.
- the
- The cask's zap keeps
~/.nodespace/database. - The app evicts a daemon whose executable does not match its profile. It tells the user when it cannot.
-
bun run scripts/check-pro-boundary.tspasses. Every remainingeditionBranchinghit is in an exempt recognition-point file. - At every step, the free app kept the same plist, label, socket, pid file and marker, apart from the intended ADR-084 behaviours.
- The Pro build from sync never broke: no change merged before its gate.
Dependencies
- NodeSpaceAI/nodespace-docs#90 (ADR-082) (ADR-082, proposed) and NodeSpaceAI/nodespace-docs#94 (ADR-084) (ADR-084, proposed).
- Add the Pro-boundary ratchet check and the CLAUDE.md Pro/sync placement rule #3299: the ratchet.
- Route the desktop app through run(extensions, context) with no extensions in core #3306: the entry point that takes
AppExtensions. - Delete the Pro arm of core's built-in update source and its worker parsing #3323: removes
update_check.rs'sis_pro_build()reader. - SYNC gates: the pin gate and the shared-socket gate.
Out of scope
- The Pro update source and the Pro Tauri commands and client (Move the Pro Tauri layer out of core: pro_* commands, ProClient, proto, update source #3336).
- The frontend Pro surfaces (Turn the UI-extension registry into ADR-082's build-time frontend extension API #3317, Move the Pro account, admission and synced-database settings out of core #3327, Move the Pro sync and collaboration UI out of core #3333).
- Pro wording in other files (Remove Pro, Supabase and nodespace-sync wording from core comments, docs and the skill #3372).
- nodespace-docs.
- The Pro installer, and every other sync-side change.
Plan key: C8 (pro-boundary DAG).
🤖 Generated with Claude Code
Activity
mstomar125 commentedon Oct 1, 2026
Superseded by #3412 (umbrella against the final ADR-081–085)