Repository navigation
feat(desktop): the Mac app gives its agents the j5 command - #418
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
This review includes 9 billable files and costs up to $2.25.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 59 minutes for your next included review. View limit detailsLimit details: You’ve used all 2 included reviews currently available. Your 51 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (9)
Comment |
feb2457 to
c509b3a
Compare
|
Review panel (Opus 5.5 code review, Astra live test). Findings on this PR, verified by the builder and fixed in c509b3a303:
Noted, not changed (nit, Opus). Not run. The packaged startup step hasn't run in a real app build; Astra reviewed the code and ran its tests. |
c509b3a to
e4add6f
Compare
e4add6f to
2d4f79f
Compare
2d4f79f to
f610d80
Compare
|
Review panel, second pass (Opus 5.5, Astra). This PR is now a single commit, f610d80e20:
Still not run: the app's startup step in a packaged build. |
f610d80 to
e02faea
Compare
e02faea to
5249702
Compare
Agents run by the Mac app couldn't call `j5`: the app installed no CLI. At each launch the packaged macOS app now writes a script that runs its bundled CLI to `<home>/bin/j5`, the directory a release server uses for its own `j5`. The app's server finds it there and puts that directory first on its agents' PATH; the app doesn't set PATH itself, because the server rebuilds PATH from the login shell (review panel, second pass). Nothing outside the J5 home is touched: no command on the person's PATH and no shell startup file. An in-app command to install `j5` for the person's own terminal is #441. The script says so when the app is gone. Part of #397. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
5249702 to
9783af8
Compare
Stack 5/5. Depends on #417.
Problem
Agents run by the Mac app couldn't call
j5: the app installed no CLI, and its agents only had one if the person had installed the command-line version too. Part of #397.What changed
At each launch, after it installs the login shell's environment and before its backend starts, the packaged macOS app:
~/.j5code/bin/j5runsELECTRON_RUN_AS_NODE=1 exec <app executable> <app.asar>/apps/server/dist/bin.mjs "$@", the way the app already starts its own server. It's rewritten every launch, so it follows the app if the app moves, and it says so plainly if the app has been deleted.~/.j5code/binfirst on its agents'PATH(feat(server): agents can run the server's own j5 #417), the directory a release server uses for its ownj5. The app doesn't setPATHitself: its server rebuildsPATHfrom the login shell, which would push the directory behind the person's own.It leaves the person's setup alone. No command is put on their
PATHand no shell startup file is edited. Most desktop apps never edit shell files, and the few that do have a record of bugs from it. An in-app command to installj5for the person's own terminal, as VS Code offers, is #441. Until then a desktop-only user can run~/.j5code/bin/j5.The app's server runs exactly as before. The step is skipped in development and off macOS, where J5 ships no desktop build.
How it was checked.
--version,--help,project addandproject renameagainst a server, each exit 0, with no Dock icon or dialogs.The startup step itself hasn't run in a packaged build.
Upstream impact
apps/desktop/src/app/DesktopApp.ts: one call afterinstallIntoProcess, into J5-ownedapps/desktop/src/j5/desktopCli.ts.packages/shared/package.json: one export appended.Checklist
desktopCli.test.tsin desktop (the script; nothing written outside the J5 home; a server link replaced without touching its target; nothing in a development build); the shared script test;agentPath.test.tsin feat(server): agents can run the server's own j5 #417 (the server putting the script's directory first)FORK.md(case text and file-table row)docs/user/install.mdsays agents getj5and how to run it yourselfBuilt by Claude Opus 5.5 (1M context) in Claude Code.
🤖 Generated with Claude Code