kaizen-agent 1.72.0 → 1.72.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/web.ts +11 -1
- package/package.json +1 -1
package/cli/web.ts
CHANGED
|
@@ -72,7 +72,10 @@ const installed = () => {
|
|
|
72
72
|
const VERSION = installed();
|
|
73
73
|
// Set by the desktop app when this board is its own read-only copy, which updates
|
|
74
74
|
// with the app. Read once and removed, so terminals and agents this board starts
|
|
75
|
-
// (and any board started from them) do not inherit it.
|
|
75
|
+
// (and any board started from them) do not inherit it. The app's KAIZEN_HOME (that
|
|
76
|
+
// copy's folder) is removed too, both again in web() after adoptLoginEnv, which would
|
|
77
|
+
// put them back: inherited, it sent `kaizen upgrade` in a board terminal at the
|
|
78
|
+
// read-only AppImage (EROFS).
|
|
76
79
|
const DESKTOP_BUNDLED = process.env.KAIZEN_DESKTOP_BUNDLED === "1";
|
|
77
80
|
delete process.env.KAIZEN_DESKTOP_BUNDLED;
|
|
78
81
|
// An upgrade replaces the page files under a running board but not its code, and a
|
|
@@ -186,6 +189,13 @@ export async function web(repoDir: string, opts: Opts = {}) {
|
|
|
186
189
|
// Before anything looks for an agent on PATH: the board starts agents itself, and
|
|
187
190
|
// from a launcher it would otherwise have none of the user's shell setup.
|
|
188
191
|
adoptLoginEnv();
|
|
192
|
+
// After the login shell's variables: Bun runs that probe with the board's original
|
|
193
|
+
// environment, so it hands back what was removed at load and adoptLoginEnv put it back.
|
|
194
|
+
// The desktop app's flag never leaves this board, and nor does its KAIZEN_HOME (the
|
|
195
|
+
// bundled copy's folder, which the board has as repoDir and reads no more): its
|
|
196
|
+
// terminals and agents get the user's own install. A KAIZEN_HOME the user set is kept.
|
|
197
|
+
delete process.env.KAIZEN_DESKTOP_BUNDLED;
|
|
198
|
+
if (DESKTOP_BUNDLED && process.env.KAIZEN_HOME && resolve(process.env.KAIZEN_HOME) === resolve(repoDir)) delete process.env.KAIZEN_HOME;
|
|
189
199
|
// Where the board started. Each page picks its own project and names it in the
|
|
190
200
|
// x-kz-dir header, so a phone choosing another project never moves this tab.
|
|
191
201
|
const boardState = locate();
|
package/package.json
CHANGED