agentlane 0.4.0-rc.2 → 0.4.0-rc.3
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/CHANGELOG.md +1 -0
- package/dist/driver/install.js +10 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,7 @@ Newest first.
|
|
|
11
11
|
|
|
12
12
|
### Fixed
|
|
13
13
|
|
|
14
|
+
- Maestro starts with the JDK in `AGENTLANE_JAVA_HOME` when `JAVA_HOME` is another version. `up`, `doctor` and the Android build already read it first, but `look`, `screenshot` and the other driving commands read only `JAVA_HOME`, so they refused a Java 21 `JAVA_HOME` that `doctor` had passed.
|
|
14
15
|
- `up` and `doctor` no longer fail capture hygiene on a Mac where the simulator reads its pinned status-bar time back as `9:41`. They accepted only `09:41`, which is how some Macs print it.
|
|
15
16
|
- `init` no longer lists 0.2.x's `.github/hooks/agent-env.json` as `unchanged` in a project that doesn't have it. It lists that file only when it changes or removes it.
|
|
16
17
|
- Under `exec` and in the signin hook, `maestro` is the lane's own Maestro, or it prints why the lane has none and exits 2. A lane whose `agentlane.json` was invalid or had no `driver` block, or that held no running simulator or emulator, ran whatever `maestro` came first on PATH, unbound to the lane's device, after one warning that named only the file. The message now gives the config's problems, or what is missing and how to add it. A project that ran its own Maestro under `exec` without a `driver` block adds `"driver": {}` to `agentlane.json`.
|
package/dist/driver/install.js
CHANGED
|
@@ -4,6 +4,7 @@ import os from 'node:os';
|
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
import { Readable } from 'node:stream';
|
|
6
6
|
import { pipeline } from 'node:stream/promises';
|
|
7
|
+
import { JAVA_HOME_ENV } from "../hooks/env.js";
|
|
7
8
|
import { CLI, envName, TOOL } from "../name.js";
|
|
8
9
|
import { identityOf, systemProcesses } from "../processes.js";
|
|
9
10
|
import { DriverError } from "./errors.js";
|
|
@@ -12,7 +13,7 @@ import { tryLock, unlock } from "./lock.js";
|
|
|
12
13
|
import { MAESTRO_RELEASE } from "./release.js";
|
|
13
14
|
/** A Maestro binary to use instead of the pinned build, such as a local build of `maestro/`. */
|
|
14
15
|
export const MAESTRO_OVERRIDE_ENV = envName('MAESTRO');
|
|
15
|
-
const JDK_FIX = `install JDK 17 ('brew install openjdk@17'), or set
|
|
16
|
+
const JDK_FIX = `install JDK 17 ('brew install openjdk@17'), or set ${JAVA_HOME_ENV} to a JDK 17 home`;
|
|
16
17
|
const INSTALL_LOCK_WAIT_MS = 15 * 60_000;
|
|
17
18
|
export function dataDir(env) {
|
|
18
19
|
const xdg = env.XDG_DATA_HOME;
|
|
@@ -62,13 +63,14 @@ async function javaSettings(home) {
|
|
|
62
63
|
javaHome: /^\s*java\.home = (.+)$/m.exec(text)?.[1]?.trim(),
|
|
63
64
|
};
|
|
64
65
|
}
|
|
65
|
-
/** Finds JDK 17 the way maestro/build.sh does
|
|
66
|
+
/** Finds JDK 17: AGENTLANE_JAVA_HOME, then the way maestro/build.sh does, JAVA_HOME, java_home -v 17 and Homebrew's openjdk@17. */
|
|
66
67
|
export async function findJdk17(env) {
|
|
67
68
|
let candidate;
|
|
68
69
|
let origin;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
const named = env[JAVA_HOME_ENV] ? JAVA_HOME_ENV : env.JAVA_HOME ? 'JAVA_HOME' : undefined;
|
|
71
|
+
if (named) {
|
|
72
|
+
candidate = env[named];
|
|
73
|
+
origin = `${named}=${candidate ?? ''}`;
|
|
72
74
|
}
|
|
73
75
|
else {
|
|
74
76
|
const javaHome = await runCommand('/usr/libexec/java_home', ['-v', '17'], { timeoutMs: 10_000 });
|
|
@@ -89,12 +91,13 @@ export async function findJdk17(env) {
|
|
|
89
91
|
}
|
|
90
92
|
if (!candidate)
|
|
91
93
|
throw new DriverError('no JDK 17 found; Maestro runs on JDK 17', JDK_FIX);
|
|
94
|
+
const fix = named ? `${JDK_FIX}, or unset ${named} so ${TOOL} finds one` : JDK_FIX;
|
|
92
95
|
const settings = await javaSettings(candidate);
|
|
93
96
|
if (settings.spec === undefined) {
|
|
94
|
-
throw new DriverError(`${origin} has no working bin/java`,
|
|
97
|
+
throw new DriverError(`${origin} has no working bin/java`, fix);
|
|
95
98
|
}
|
|
96
99
|
if (settings.spec !== '17') {
|
|
97
|
-
throw new DriverError(`${origin} is Java ${settings.spec}, and Maestro runs on JDK 17`,
|
|
100
|
+
throw new DriverError(`${origin} is Java ${settings.spec}, and Maestro runs on JDK 17`, fix);
|
|
98
101
|
}
|
|
99
102
|
return { javaHome: settings.javaHome ?? candidate, origin };
|
|
100
103
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentlane",
|
|
3
|
-
"version": "0.4.0-rc.
|
|
3
|
+
"version": "0.4.0-rc.3",
|
|
4
4
|
"description": "Gives each coding agent its own lane: a running copy of your app with its own ports, dev servers, database, and a simulator, emulator or browser to drive it.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agents",
|