@loadmill/droid-cua 2.9.0 → 2.10.1-rc.10
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/README.md +0 -2
- package/build/index.js +24 -18
- package/build/src/brand/loadmill-mark.js +20 -0
- package/build/src/browser/playwright/connection.js +148 -11
- package/build/src/browser/playwright/welcome-page.js +161 -0
- package/build/src/cli/headless-execution-config.js +16 -24
- package/build/src/cli/headless-target.js +0 -9
- package/build/src/commands/help.js +3 -5
- package/build/src/commands/run.js +1 -1
- package/build/src/core/aim-assist.js +5 -0
- package/build/src/core/execution-engine.js +266 -505
- package/build/src/core/prompts.js +1 -1
- package/build/src/core/runtime-config.js +1 -2
- package/build/src/core/screenshot-store.js +153 -0
- package/build/src/core/tool-handlers/assert.js +155 -0
- package/build/src/core/tool-handlers/loadmill.js +29 -0
- package/build/src/core/tool-handlers/navigate.js +110 -0
- package/build/src/core/tool-handlers/preview-click.js +112 -0
- package/build/src/core/tool-handlers/test-design-complete.js +93 -0
- package/build/src/core/tool-handlers/utils.js +80 -0
- package/build/src/device/openai.js +103 -4
- package/build/src/modes/design-mode-ink.js +17 -5
- package/build/src/modes/design-mode.js +17 -5
- package/build/src/modes/execution-mode.js +42 -234
- package/build/src/prompts/base.js +44 -31
- package/build/src/prompts/design.js +55 -15
- package/build/src/prompts/editor.js +1 -1
- package/build/src/prompts/execution.js +15 -10
- package/build/src/utils/cua-debug-tracer.js +3 -1
- package/package.json +3 -4
- package/build/src/device/screenshot-resolution.js +0 -33
|
@@ -30,33 +30,24 @@ function hasNonEmptyString(value) {
|
|
|
30
30
|
export function resolveHeadlessTarget(args = {}) {
|
|
31
31
|
const target = normalizeTarget(args.target);
|
|
32
32
|
const sessionMode = normalizeSessionMode(args["session-mode"]);
|
|
33
|
-
const url = hasNonEmptyString(args.url) ? args.url.trim() : null;
|
|
34
33
|
const avdName = hasNonEmptyString(args.avd) ? args.avd.trim() : null;
|
|
35
34
|
const platform = hasNonEmptyString(args.platform) ? args.platform.trim() : null;
|
|
36
35
|
if (target === "web") {
|
|
37
|
-
if (!url) {
|
|
38
|
-
throw new Error("--target web requires --url.");
|
|
39
|
-
}
|
|
40
36
|
if (avdName || platform) {
|
|
41
37
|
throw new Error("--avd and --platform cannot be used with --target web.");
|
|
42
38
|
}
|
|
43
39
|
return {
|
|
44
40
|
target,
|
|
45
|
-
url,
|
|
46
41
|
sessionMode,
|
|
47
42
|
avdName: null,
|
|
48
43
|
platform: null,
|
|
49
44
|
};
|
|
50
45
|
}
|
|
51
|
-
if (hasNonEmptyString(args.url)) {
|
|
52
|
-
throw new Error("--url can only be used with --target web.");
|
|
53
|
-
}
|
|
54
46
|
if (args["session-mode"] != null) {
|
|
55
47
|
throw new Error("--session-mode can only be used with --target web.");
|
|
56
48
|
}
|
|
57
49
|
return {
|
|
58
50
|
target,
|
|
59
|
-
url: null,
|
|
60
51
|
sessionMode: null,
|
|
61
52
|
avdName,
|
|
62
53
|
platform,
|
|
@@ -14,17 +14,17 @@ export async function handleHelp(args, session, context) {
|
|
|
14
14
|
addOutput({ type: 'info', text: '' });
|
|
15
15
|
addOutput({ type: 'info', text: 'Usage:' });
|
|
16
16
|
addOutput({ type: 'info', text: ' droid-cua --avd <device-name> [options]' });
|
|
17
|
-
addOutput({ type: 'info', text: ' droid-cua --target web --
|
|
17
|
+
addOutput({ type: 'info', text: ' droid-cua --target web --instructions <file> [options]' });
|
|
18
18
|
addOutput({ type: 'info', text: '' });
|
|
19
19
|
addOutput({ type: 'info', text: 'Options:' });
|
|
20
20
|
addOutput({ type: 'info', text: ' --target <kind> Target kind: mobile (default) or web' });
|
|
21
21
|
addOutput({ type: 'info', text: ' --avd <name> Device name (Android device ID/serial or iOS Simulator)' });
|
|
22
22
|
addOutput({ type: 'info', text: ' --platform <platform> Force platform: android or ios' });
|
|
23
23
|
addOutput({ type: 'info', text: ' --instructions <file> Run test file in headless mode' });
|
|
24
|
-
addOutput({ type: 'info', text: ' --url <value> Required starting URL for --target web headless runs' });
|
|
25
24
|
addOutput({ type: 'info', text: ' --session-mode <mode> Browser session mode for web runs: persistent or fresh' });
|
|
26
25
|
addOutput({ type: 'info', text: ' --config <file> Headless execution JSON config for prompt parity' });
|
|
27
26
|
addOutput({ type: 'info', text: ' --cua-model <model> Headless CUA model override: gpt-5.4 or gpt-5.4-mini' });
|
|
27
|
+
addOutput({ type: 'info', text: ' --aim-assist <mode> Headless Aim Assist mode: off, smart, or always' });
|
|
28
28
|
addOutput({ type: 'info', text: ' --context <file> Optional app context file injected into execution runs' });
|
|
29
29
|
addOutput({ type: 'info', text: ' --no-context Disable app context for headless execution' });
|
|
30
30
|
addOutput({ type: 'info', text: ' --context-optimization-threshold <tokens> Headless Context Optimization compaction threshold' });
|
|
@@ -33,8 +33,6 @@ export async function handleHelp(args, session, context) {
|
|
|
33
33
|
addOutput({ type: 'info', text: ' --execution-prompt <text> Headless execution prompt customization text' });
|
|
34
34
|
addOutput({ type: 'info', text: ' --base-prompt-file Headless base prompt customization file' });
|
|
35
35
|
addOutput({ type: 'info', text: ' --execution-prompt-file Headless execution prompt customization file' });
|
|
36
|
-
addOutput({ type: 'info', text: ' --strict Strict Mode: re-observe after the first action in a chain' });
|
|
37
|
-
addOutput({ type: 'info', text: ' --no-strict Disable Strict Mode for headless config-driven runs' });
|
|
38
36
|
addOutput({ type: 'info', text: ' --record Record screenshots during execution' });
|
|
39
37
|
addOutput({ type: 'info', text: ' --debug Enable structured JSONL debug artifacts' });
|
|
40
38
|
addOutput({ type: 'info', text: '' });
|
|
@@ -75,7 +73,7 @@ export async function handleHelp(args, session, context) {
|
|
|
75
73
|
addOutput({ type: 'info', text: ' droid-cua --avd "iPhone 16" (iOS Simulator, auto-detected)' });
|
|
76
74
|
addOutput({ type: 'info', text: ' droid-cua --platform ios --avd MySim (Force iOS platform)' });
|
|
77
75
|
addOutput({ type: 'info', text: ' droid-cua --instructions tests/login.dcua --context app/context.md' });
|
|
78
|
-
addOutput({ type: 'info', text: ' droid-cua --target web --
|
|
76
|
+
addOutput({ type: 'info', text: ' droid-cua --target web --instructions tests/search.dcua' });
|
|
79
77
|
addOutput({ type: 'info', text: ' /create login-test (design a new test)' });
|
|
80
78
|
addOutput({ type: 'info', text: ' /list (see all tests)' });
|
|
81
79
|
addOutput({ type: 'info', text: ' /view login-test (view test contents)' });
|
|
@@ -88,7 +88,7 @@ export async function handleRun(args, session, context) {
|
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
// Set execution mode system prompt (replaces any design mode prompt)
|
|
91
|
-
const executionPrompt = buildExecutionModePrompt(session.deviceInfo, {}, appContextText
|
|
91
|
+
const executionPrompt = buildExecutionModePrompt(session.deviceInfo, {}, appContextText);
|
|
92
92
|
session.setSystemPrompt(executionPrompt);
|
|
93
93
|
// Create execution mode
|
|
94
94
|
const executionMode = new ExecutionMode(session, context.engine, instructions);
|