@loadmill/droid-cua 2.9.0 → 2.10.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.
- package/README.md +0 -2
- package/build/index.js +13 -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 +119 -191
- package/build/src/core/runtime-config.js +1 -2
- package/build/src/device/openai.js +12 -6
- package/build/src/modes/design-mode-ink.js +1 -3
- package/build/src/modes/design-mode.js +1 -3
- package/build/src/prompts/base.js +44 -30
- package/build/src/prompts/design.js +3 -4
- package/build/src/prompts/execution.js +6 -5
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DEFAULT_AIM_ASSIST_MODE } from "../core/aim-assist.js";
|
|
2
|
+
import { appendCustomSections, buildBaseSystemPrompt, isBrowserTarget } from "./base.js";
|
|
2
3
|
export function buildAppContextSection(text) {
|
|
3
4
|
const trimmed = typeof text === "string" ? text.trim() : "";
|
|
4
5
|
if (!trimmed) {
|
|
@@ -10,11 +11,11 @@ Use this to understand screen layouts, terminology, navigation, and expected beh
|
|
|
10
11
|
|
|
11
12
|
${trimmed}`;
|
|
12
13
|
}
|
|
13
|
-
export function buildExecutionModePrompt(deviceInfo, customInstructions = {}, appContextText = "",
|
|
14
|
+
export function buildExecutionModePrompt(deviceInfo, customInstructions = {}, appContextText = "", options = {}) {
|
|
14
15
|
const executionCustomText = typeof customInstructions.executionModeInstructions === "string" ? customInstructions.executionModeInstructions.trim() : "";
|
|
15
|
-
const
|
|
16
|
+
const aimAssistMode = typeof options.aimAssistMode === "string" ? options.aimAssistMode : DEFAULT_AIM_ASSIST_MODE;
|
|
17
|
+
const basePrompt = buildBaseSystemPrompt(deviceInfo, { aimAssistMode });
|
|
16
18
|
const appContextSection = buildAppContextSection(appContextText);
|
|
17
|
-
const strictModeSection = buildStrictModeRuntimeSection(runtimeOptions);
|
|
18
19
|
const browserTarget = isBrowserTarget(deviceInfo);
|
|
19
20
|
const prompt = `${basePrompt}
|
|
20
21
|
|
|
@@ -45,7 +46,7 @@ Your process:
|
|
|
45
46
|
6. Stop immediately - no commentary, no questions
|
|
46
47
|
|
|
47
48
|
Each instruction is independent. Do not reference previous instructions or ask about next steps.
|
|
48
|
-
${appContextSection ? `\n\n${appContextSection}` : ""}
|
|
49
|
+
${appContextSection ? `\n\n${appContextSection}` : ""}`;
|
|
49
50
|
return appendCustomSections(prompt, [
|
|
50
51
|
{ title: "Base Prompt Instructions", text: customInstructions.basePromptInstructions },
|
|
51
52
|
{ title: "Execution Mode Instructions", text: executionCustomText }
|