@loadmill/droid-cua 2.25.0 → 2.26.0

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.
@@ -7,6 +7,15 @@
7
7
  * previous phase (if any) just ended
8
8
  * - "note": persistent information worth keeping after the line clears
9
9
  * (e.g. billed device-minutes)
10
+ * - "phase-close-text": overrides the persisted "✔ <name> (Nms)" line that
11
+ * will be printed when the current phase closes, with an
12
+ * arbitrary caller-supplied string (e.g. richer poll/download
13
+ * summaries) instead of the default elapsed-ms text.
14
+ * - "print": a verbatim persistent line (no ℹ/✔ prefix) that first closes
15
+ * any still-open phase, so a final summary can never race
16
+ * ahead of / glue onto the active spinner or an unflushed
17
+ * phase-close line. Use this instead of raw console.log while
18
+ * a status line may be active.
10
19
  * With no listener installed, reports are dropped.
11
20
  */
12
21
  let listener = null;
@@ -22,3 +31,23 @@ export function reportCloudPhase(name) {
22
31
  export function reportCloudNote(message) {
23
32
  listener?.({ kind: "note", message });
24
33
  }
34
+ export function reportCloudPhaseCloseText(text) {
35
+ listener?.({ kind: "phase-close-text", message: text });
36
+ }
37
+ // Forces the currently-open phase (if any) to flush its "✔ ..." close line
38
+ // immediately, instead of waiting for the next reportCloudPhase() call to
39
+ // lazily trigger it. Needed when a note must appear strictly *after* a
40
+ // phase's close line rather than racing ahead of it (the close line only
41
+ // carries its final text via reportCloudPhaseCloseText, which by itself
42
+ // doesn't print anything until something forces the phase closed).
43
+ export function reportCloudPhaseFlush() {
44
+ listener?.({ kind: "phase-flush" });
45
+ }
46
+ export function reportCloudPrint(text) {
47
+ if (listener) {
48
+ listener({ kind: "print", message: text });
49
+ }
50
+ else {
51
+ console.log(text);
52
+ }
53
+ }
@@ -1,7 +1,8 @@
1
1
  import { browserStackAdapter } from "./browserstack/adapter.js";
2
2
  import { lambdaTestAdapter } from "./lambdatest/adapter.js";
3
3
  import { awsDeviceFarmAdapter } from "./aws-device-farm/adapter.js";
4
- const availableAdapters = [browserStackAdapter, lambdaTestAdapter, awsDeviceFarmAdapter];
4
+ import { loadmillCloudAdapter } from "./loadmill-cloud/adapter.js";
5
+ const availableAdapters = [browserStackAdapter, lambdaTestAdapter, awsDeviceFarmAdapter, loadmillCloudAdapter];
5
6
  export function listCloudProviderAdapters() {
6
7
  return availableAdapters;
7
8
  }
@@ -23,6 +23,9 @@ export async function connectToDevice(deviceNameOrOptions, platform = null, opti
23
23
  log(`Platform: ${detectedPlatform}`);
24
24
  return currentBackend.connectToDevice(cloudOptions, options);
25
25
  }
26
+ if (getCurrentSource() !== "local" && currentBackend) {
27
+ throw new Error("A cloud device session is active; disconnect it before connecting to a local device.");
28
+ }
26
29
  const detectedPlatform = platform || detectPlatform(deviceNameOrOptions);
27
30
  setCurrentSource("local");
28
31
  setCurrentPlatform(detectedPlatform);
@@ -9,6 +9,7 @@ const cuaDebugTracer = new CuaDebugTracer(logger);
9
9
  const LOADMILL_DEVICE_METADATA_MODELS = new Set([
10
10
  ...LOADMILL_CUA_MODELS,
11
11
  LOADMILL_MODEL_ALIASES.SMART,
12
+ LOADMILL_MODEL_ALIASES.PULSE,
12
13
  LOADMILL_MODEL_ALIASES.BEACON,
13
14
  ]);
14
15
  function resolveOpenAiBaseUrl(client) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loadmill/droid-cua",
3
- "version": "2.25.0",
3
+ "version": "2.26.0",
4
4
  "description": "AI-powered Android testing agent using OpenAI's computer-use model and ADB",
5
5
  "main": "build/index.js",
6
6
  "type": "module",
@@ -2,17 +2,17 @@
2
2
 
3
3
  ## Construct the run
4
4
 
5
- Prefer a single test before a directory or scenario run. Preserve an existing provider/model choice in `ci/droid-cua.json`; otherwise use the Loadmill provider. Use Loadmill Smart as the recommended default, or Loadmill Beacon when the user prioritizes faster, lower-cost execution:
5
+ Prefer a single test before a directory or scenario run. Preserve an existing provider/model choice in `ci/droid-cua.json`; otherwise use the Loadmill provider. Use Loadmill Smart as the recommended default, or Loadmill Pulse when the user prioritizes faster, lower-cost execution:
6
6
 
7
7
  ```sh
8
8
  # Recommended default
9
9
  --llm-provider loadmill --cua-model loadmill-smart
10
10
 
11
11
  # Faster, lower-cost option
12
- --llm-provider loadmill --cua-model loadmill-beacon
12
+ --llm-provider loadmill --cua-model loadmill-pulse
13
13
  ```
14
14
 
15
- Both Loadmill models require `LOADMILL_API_TOKEN`. Do not switch between Smart and Beacon silently; preserve the project's model or explain the speed/cost tradeoff and follow the user's choice. If the user chooses direct OpenAI access instead, require `OPENAI_API_KEY` and use `--llm-provider openai` with one of `gpt-5.6-terra`, `gpt-5.6-luna`, or `gpt-5.4`. Do not mix a provider with another provider's model, silently switch providers, or override an existing project choice without explaining it.
15
+ All Loadmill models require `LOADMILL_API_TOKEN`. Do not switch between Smart, Pulse, and Beacon silently; preserve the project's model or explain the capability, speed, and experimental tradeoffs and follow the user's choice. If the user chooses direct OpenAI access instead, require `OPENAI_API_KEY` and use `--llm-provider openai` with one of `gpt-5.6-terra`, `gpt-5.6-luna`, or `gpt-5.4`. Do not mix a provider with another provider's model, silently switch providers, or override an existing project choice without explaining it.
16
16
 
17
17
  Include `--report reports/<test-name>.html` for normal test runs unless the user opts out. Prefer an explicit filename over a directory so the result is easy to locate. Add `--debug` for every agent-observed run: it writes the screenshots needed for live progress updates as well as diagnosis.
18
18