@aiscene/core 9.0.6 → 9.0.8
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/dist/es/agent/agent.mjs +24 -11
- package/dist/es/agent/agent.mjs.map +1 -1
- package/dist/es/agent/cache-config.mjs +19 -0
- package/dist/es/agent/cache-config.mjs.map +1 -0
- package/dist/es/agent/file-chooser.mjs +82 -0
- package/dist/es/agent/file-chooser.mjs.map +1 -0
- package/dist/es/agent/insight.mjs +101 -0
- package/dist/es/agent/insight.mjs.map +1 -0
- package/dist/es/agent/metrics.mjs +81 -0
- package/dist/es/agent/metrics.mjs.map +1 -0
- package/dist/es/agent/progress/ai-act-progress.mjs +199 -0
- package/dist/es/agent/progress/ai-act-progress.mjs.map +1 -0
- package/dist/es/agent/progress/index.mjs +2 -0
- package/dist/es/agent/progress/progress-bus.mjs +52 -0
- package/dist/es/agent/progress/progress-bus.mjs.map +1 -0
- package/dist/es/agent/prompt-context.mjs +25 -0
- package/dist/es/agent/prompt-context.mjs.map +1 -0
- package/dist/es/agent/record-to-report.mjs +14 -0
- package/dist/es/agent/record-to-report.mjs.map +1 -0
- package/dist/es/agent/run-gherkin-scenario.mjs +114 -0
- package/dist/es/agent/run-gherkin-scenario.mjs.map +1 -0
- package/dist/es/agent/run-markdown.mjs +62 -0
- package/dist/es/agent/run-markdown.mjs.map +1 -0
- package/dist/es/agent/screenshot-preparation.mjs +37 -0
- package/dist/es/agent/screenshot-preparation.mjs.map +1 -0
- package/dist/es/agent/ui-observer.mjs +385 -0
- package/dist/es/agent/ui-observer.mjs.map +1 -0
- package/dist/es/agent/utils.mjs +42 -4
- package/dist/es/agent/utils.mjs.map +1 -1
- package/dist/es/ai-model/connectivity/fixture.mjs +8 -0
- package/dist/es/ai-model/connectivity/fixture.mjs.map +1 -0
- package/dist/es/ai-model/connectivity/index.mjs +2 -0
- package/dist/es/ai-model/connectivity/run-connectivity-test.mjs +160 -0
- package/dist/es/ai-model/connectivity/run-connectivity-test.mjs.map +1 -0
- package/dist/es/ai-model/conversation-history.mjs.map +1 -1
- package/dist/es/ai-model/index.mjs +2 -1
- package/dist/es/ai-model/inspect.mjs +1 -1
- package/dist/es/ai-model/inspect.mjs.map +1 -1
- package/dist/es/ai-model/model-adapter/chat-completion.mjs +69 -0
- package/dist/es/ai-model/model-adapter/chat-completion.mjs.map +1 -0
- package/dist/es/ai-model/model-adapter/custom-planning-action.mjs +6 -0
- package/dist/es/ai-model/model-adapter/custom-planning-action.mjs.map +1 -0
- package/dist/es/ai-model/model-adapter/custom-planning-types.mjs +0 -0
- package/dist/es/ai-model/model-adapter/default-insight-protocol.mjs +28 -0
- package/dist/es/ai-model/model-adapter/default-insight-protocol.mjs.map +1 -0
- package/dist/es/ai-model/model-adapter/default-locate-protocol.mjs +145 -0
- package/dist/es/ai-model/model-adapter/default-locate-protocol.mjs.map +1 -0
- package/dist/es/ai-model/model-adapter/default-planning-protocol.mjs +124 -0
- package/dist/es/ai-model/model-adapter/default-planning-protocol.mjs.map +1 -0
- package/dist/es/ai-model/model-adapter/image-preprocess.mjs +27 -0
- package/dist/es/ai-model/model-adapter/image-preprocess.mjs.map +1 -0
- package/dist/es/ai-model/model-adapter/index.mjs +2 -0
- package/dist/es/ai-model/model-adapter/insight-protocol.mjs +0 -0
- package/dist/es/ai-model/model-adapter/insight.mjs +13 -0
- package/dist/es/ai-model/model-adapter/insight.mjs.map +1 -0
- package/dist/es/ai-model/model-adapter/locate-protocol.mjs +0 -0
- package/dist/es/ai-model/model-adapter/locate.mjs +53 -0
- package/dist/es/ai-model/model-adapter/locate.mjs.map +1 -0
- package/dist/es/ai-model/model-adapter/planning-protocol.mjs +0 -0
- package/dist/es/ai-model/model-adapter/planning.mjs +49 -0
- package/dist/es/ai-model/model-adapter/planning.mjs.map +1 -0
- package/dist/es/ai-model/model-adapter/resolve.mjs +54 -0
- package/dist/es/ai-model/model-adapter/resolve.mjs.map +1 -0
- package/dist/es/ai-model/model-adapter/types.mjs +0 -0
- package/dist/es/ai-model/models/auto-glm/actions.mjs +205 -0
- package/dist/es/ai-model/models/auto-glm/actions.mjs.map +1 -0
- package/dist/es/ai-model/models/auto-glm/adapter.mjs +45 -0
- package/dist/es/ai-model/models/auto-glm/adapter.mjs.map +1 -0
- package/dist/es/ai-model/models/auto-glm/locate.mjs +11 -0
- package/dist/es/ai-model/models/auto-glm/locate.mjs.map +1 -0
- package/dist/es/ai-model/models/auto-glm/parser.mjs +217 -0
- package/dist/es/ai-model/models/auto-glm/parser.mjs.map +1 -0
- package/dist/es/ai-model/models/auto-glm/planning.mjs +33 -0
- package/dist/es/ai-model/models/auto-glm/planning.mjs.map +1 -0
- package/dist/es/ai-model/models/auto-glm/prompt.mjs +214 -0
- package/dist/es/ai-model/models/auto-glm/prompt.mjs.map +1 -0
- package/dist/es/ai-model/models/deepseek/adapter.mjs +79 -0
- package/dist/es/ai-model/models/deepseek/adapter.mjs.map +1 -0
- package/dist/es/ai-model/models/deepseek/locate-protocol.mjs +89 -0
- package/dist/es/ai-model/models/deepseek/locate-protocol.mjs.map +1 -0
- package/dist/es/ai-model/models/default.mjs +13 -0
- package/dist/es/ai-model/models/default.mjs.map +1 -0
- package/dist/es/ai-model/models/doubao.mjs +95 -0
- package/dist/es/ai-model/models/doubao.mjs.map +1 -0
- package/dist/es/ai-model/models/gemini.mjs +100 -0
- package/dist/es/ai-model/models/gemini.mjs.map +1 -0
- package/dist/es/ai-model/models/glm.mjs +46 -0
- package/dist/es/ai-model/models/glm.mjs.map +1 -0
- package/dist/es/ai-model/models/gpt.mjs +43 -0
- package/dist/es/ai-model/models/gpt.mjs.map +1 -0
- package/dist/es/ai-model/models/index.mjs +2 -0
- package/dist/es/ai-model/models/kimi.mjs +102 -0
- package/dist/es/ai-model/models/kimi.mjs.map +1 -0
- package/dist/es/ai-model/models/mimo.mjs +36 -0
- package/dist/es/ai-model/models/mimo.mjs.map +1 -0
- package/dist/es/ai-model/models/qwen.mjs +139 -0
- package/dist/es/ai-model/models/qwen.mjs.map +1 -0
- package/dist/es/ai-model/models/registry.mjs +51 -0
- package/dist/es/ai-model/models/registry.mjs.map +1 -0
- package/dist/es/ai-model/models/ui-tars/actions.mjs +147 -0
- package/dist/es/ai-model/models/ui-tars/actions.mjs.map +1 -0
- package/dist/es/ai-model/models/ui-tars/adapter.mjs +102 -0
- package/dist/es/ai-model/models/ui-tars/adapter.mjs.map +1 -0
- package/dist/es/ai-model/models/ui-tars/parser.mjs +40 -0
- package/dist/es/ai-model/models/ui-tars/parser.mjs.map +1 -0
- package/dist/es/ai-model/models/ui-tars/planning.mjs +25 -0
- package/dist/es/ai-model/models/ui-tars/planning.mjs.map +1 -0
- package/dist/es/ai-model/models/ui-tars/prompt.mjs +36 -0
- package/dist/es/ai-model/models/ui-tars/prompt.mjs.map +1 -0
- package/dist/es/ai-model/models/utils/intent.mjs +6 -0
- package/dist/es/ai-model/models/utils/intent.mjs.map +1 -0
- package/dist/es/ai-model/prompt/insight/index.mjs +3 -0
- package/dist/es/ai-model/prompt/insight/system-prompt.mjs +104 -0
- package/dist/es/ai-model/prompt/insight/system-prompt.mjs.map +1 -0
- package/dist/es/ai-model/prompt/insight/user-prompt.mjs +23 -0
- package/dist/es/ai-model/prompt/insight/user-prompt.mjs.map +1 -0
- package/dist/es/ai-model/prompt/locate/element-system-prompt.mjs +12 -0
- package/dist/es/ai-model/prompt/locate/element-system-prompt.mjs.map +1 -0
- package/dist/es/ai-model/prompt/locate/grounding-rules.mjs +13 -0
- package/dist/es/ai-model/prompt/locate/grounding-rules.mjs.map +1 -0
- package/dist/es/ai-model/prompt/locate/index.mjs +4 -0
- package/dist/es/ai-model/prompt/locate/search-area-system-prompt.mjs +9 -0
- package/dist/es/ai-model/prompt/locate/search-area-system-prompt.mjs.map +1 -0
- package/dist/es/ai-model/prompt/planning/action-output-example.mjs +52 -0
- package/dist/es/ai-model/prompt/planning/action-output-example.mjs.map +1 -0
- package/dist/es/ai-model/prompt/planning/action-space-description.mjs +28 -0
- package/dist/es/ai-model/prompt/planning/action-space-description.mjs.map +1 -0
- package/dist/es/ai-model/prompt/planning/index.mjs +6 -0
- package/dist/es/ai-model/prompt/planning/multi-turn-example.mjs +221 -0
- package/dist/es/ai-model/prompt/planning/multi-turn-example.mjs.map +1 -0
- package/dist/es/ai-model/prompt/planning/planning-response-example.mjs +25 -0
- package/dist/es/ai-model/prompt/planning/planning-response-example.mjs.map +1 -0
- package/dist/es/ai-model/prompt/planning/sub-goals-text.mjs +17 -0
- package/dist/es/ai-model/prompt/planning/sub-goals-text.mjs.map +1 -0
- package/dist/es/ai-model/prompt/planning/system-prompt.mjs +293 -0
- package/dist/es/ai-model/prompt/planning/system-prompt.mjs.map +1 -0
- package/dist/es/ai-model/service-caller/codex-app-server.mjs +1 -0
- package/dist/es/ai-model/service-caller/codex-app-server.mjs.map +1 -1
- package/dist/es/ai-model/service-caller/index.mjs +35 -16
- package/dist/es/ai-model/service-caller/index.mjs.map +1 -1
- package/dist/es/ai-model/service-caller/model-call-recorder.mjs +74 -0
- package/dist/es/ai-model/service-caller/model-call-recorder.mjs.map +1 -0
- package/dist/es/ai-model/service-caller/openai-error.mjs +147 -0
- package/dist/es/ai-model/service-caller/openai-error.mjs.map +1 -0
- package/dist/es/ai-model/service-caller/proxy-deps.node.mjs +9 -0
- package/dist/es/ai-model/service-caller/proxy-deps.node.mjs.map +1 -0
- package/dist/es/ai-model/service-caller/proxy-deps.stub.mjs +12 -0
- package/dist/es/ai-model/service-caller/proxy-deps.stub.mjs.map +1 -0
- package/dist/es/ai-model/service-caller/semantic-retry.mjs +33 -0
- package/dist/es/ai-model/service-caller/semantic-retry.mjs.map +1 -0
- package/dist/es/ai-model/service-caller/types.mjs +0 -0
- package/dist/es/ai-model/shared/action-schema.mjs +15 -0
- package/dist/es/ai-model/shared/action-schema.mjs.map +1 -0
- package/dist/es/ai-model/shared/json.mjs +63 -0
- package/dist/es/ai-model/shared/json.mjs.map +1 -0
- package/dist/es/ai-model/shared/model-locate-result/bbox.mjs +60 -0
- package/dist/es/ai-model/shared/model-locate-result/bbox.mjs.map +1 -0
- package/dist/es/ai-model/shared/model-locate-result/coordinate-distance.mjs +10 -0
- package/dist/es/ai-model/shared/model-locate-result/coordinate-distance.mjs.map +1 -0
- package/dist/es/ai-model/shared/model-locate-result/errors.mjs +9 -0
- package/dist/es/ai-model/shared/model-locate-result/errors.mjs.map +1 -0
- package/dist/es/ai-model/shared/model-locate-result/factory.mjs +39 -0
- package/dist/es/ai-model/shared/model-locate-result/factory.mjs.map +1 -0
- package/dist/es/ai-model/shared/model-locate-result/index.mjs +6 -0
- package/dist/es/ai-model/shared/model-locate-result/parse.mjs +45 -0
- package/dist/es/ai-model/shared/model-locate-result/parse.mjs.map +1 -0
- package/dist/es/ai-model/shared/model-locate-result/pixel-bbox-mapper.mjs +67 -0
- package/dist/es/ai-model/shared/model-locate-result/pixel-bbox-mapper.mjs.map +1 -0
- package/dist/es/ai-model/shared/model-locate-result/prompt-spec.mjs +110 -0
- package/dist/es/ai-model/shared/model-locate-result/prompt-spec.mjs.map +1 -0
- package/dist/es/ai-model/shared/model-locate-result/types.mjs +9 -0
- package/dist/es/ai-model/shared/model-locate-result/types.mjs.map +1 -0
- package/dist/es/ai-model/shared/multimodal-prompt.mjs +55 -0
- package/dist/es/ai-model/shared/multimodal-prompt.mjs.map +1 -0
- package/dist/es/ai-model/shared/xml.mjs +42 -0
- package/dist/es/ai-model/shared/xml.mjs.map +1 -0
- package/dist/es/ai-model/workflows/grounding/index.mjs +4 -0
- package/dist/es/ai-model/workflows/grounding/locate-result-rect.mjs +23 -0
- package/dist/es/ai-model/workflows/grounding/locate-result-rect.mjs.map +1 -0
- package/dist/es/ai-model/workflows/grounding/locate.mjs +168 -0
- package/dist/es/ai-model/workflows/grounding/locate.mjs.map +1 -0
- package/dist/es/ai-model/workflows/grounding/planning-action-locate.mjs +97 -0
- package/dist/es/ai-model/workflows/grounding/planning-action-locate.mjs.map +1 -0
- package/dist/es/ai-model/workflows/grounding/search-area-mapping.mjs +18 -0
- package/dist/es/ai-model/workflows/grounding/search-area-mapping.mjs.map +1 -0
- package/dist/es/ai-model/workflows/grounding/search-area.mjs +55 -0
- package/dist/es/ai-model/workflows/grounding/search-area.mjs.map +1 -0
- package/dist/es/ai-model/workflows/grounding/section-locate.mjs +146 -0
- package/dist/es/ai-model/workflows/grounding/section-locate.mjs.map +1 -0
- package/dist/es/ai-model/workflows/grounding/types.mjs +0 -0
- package/dist/es/ai-model/workflows/grounding/utils.mjs +50 -0
- package/dist/es/ai-model/workflows/grounding/utils.mjs.map +1 -0
- package/dist/es/ai-model/workflows/insight/extraction.mjs +101 -0
- package/dist/es/ai-model/workflows/insight/extraction.mjs.map +1 -0
- package/dist/es/ai-model/workflows/insight/index.mjs +3 -0
- package/dist/es/ai-model/workflows/insight/insight-response-parser.mjs +26 -0
- package/dist/es/ai-model/workflows/insight/insight-response-parser.mjs.map +1 -0
- package/dist/es/ai-model/workflows/insight/order-sensitive.mjs +29 -0
- package/dist/es/ai-model/workflows/insight/order-sensitive.mjs.map +1 -0
- package/dist/es/ai-model/workflows/planning/conversation-history.mjs +185 -0
- package/dist/es/ai-model/workflows/planning/conversation-history.mjs.map +1 -0
- package/dist/es/ai-model/workflows/planning/custom-planning.mjs +129 -0
- package/dist/es/ai-model/workflows/planning/custom-planning.mjs.map +1 -0
- package/dist/es/ai-model/workflows/planning/index.mjs +4 -0
- package/dist/es/ai-model/workflows/planning/locate-normalization.mjs +41 -0
- package/dist/es/ai-model/workflows/planning/locate-normalization.mjs.map +1 -0
- package/dist/es/ai-model/workflows/planning/planning-action-log.mjs +22 -0
- package/dist/es/ai-model/workflows/planning/planning-action-log.mjs.map +1 -0
- package/dist/es/ai-model/workflows/planning/standard-planning-parser.mjs +99 -0
- package/dist/es/ai-model/workflows/planning/standard-planning-parser.mjs.map +1 -0
- package/dist/es/ai-model/workflows/planning/standard-planning.mjs +219 -0
- package/dist/es/ai-model/workflows/planning/standard-planning.mjs.map +1 -0
- package/dist/es/ai-model/workflows/planning/types.mjs +0 -0
- package/dist/es/ai-model/workflows/recorder-generation/common.mjs +171 -0
- package/dist/es/ai-model/workflows/recorder-generation/common.mjs.map +1 -0
- package/dist/es/ai-model/workflows/recorder-generation/index.mjs +5 -0
- package/dist/es/ai-model/workflows/recorder-generation/markdown.mjs +253 -0
- package/dist/es/ai-model/workflows/recorder-generation/markdown.mjs.map +1 -0
- package/dist/es/ai-model/workflows/recorder-generation/metadata.mjs +83 -0
- package/dist/es/ai-model/workflows/recorder-generation/metadata.mjs.map +1 -0
- package/dist/es/ai-model/workflows/recorder-generation/playwright.mjs +123 -0
- package/dist/es/ai-model/workflows/recorder-generation/playwright.mjs.map +1 -0
- package/dist/es/ai-model/workflows/recorder-generation/yaml.mjs +162 -0
- package/dist/es/ai-model/workflows/recorder-generation/yaml.mjs.map +1 -0
- package/dist/es/common.mjs +12 -1
- package/dist/es/common.mjs.map +1 -1
- package/dist/es/constants.mjs +4 -0
- package/dist/es/constants.mjs.map +1 -0
- package/dist/es/device/index.mjs.map +1 -1
- package/dist/es/device/input-strategy.mjs +34 -0
- package/dist/es/device/input-strategy.mjs.map +1 -0
- package/dist/es/dump/html-utils.mjs +16 -1
- package/dist/es/dump/html-utils.mjs.map +1 -1
- package/dist/es/dump/image-reference.mjs +63 -0
- package/dist/es/dump/image-reference.mjs.map +1 -0
- package/dist/es/dump/report-action-dump.mjs +244 -0
- package/dist/es/dump/report-action-dump.mjs.map +1 -0
- package/dist/es/dump/report-dump-compactor.mjs +200 -0
- package/dist/es/dump/report-dump-compactor.mjs.map +1 -0
- package/dist/es/dump/screenshot-store.mjs +124 -37
- package/dist/es/dump/screenshot-store.mjs.map +1 -1
- package/dist/es/dump/task-service-dump.mjs +17 -0
- package/dist/es/dump/task-service-dump.mjs.map +1 -0
- package/dist/es/dump/task-status.mjs +18 -0
- package/dist/es/dump/task-status.mjs.map +1 -0
- package/dist/es/element-describer.mjs +198 -0
- package/dist/es/element-describer.mjs.map +1 -0
- package/dist/es/errors.mjs +20 -0
- package/dist/es/errors.mjs.map +1 -0
- package/dist/es/report-html-template.mjs +4 -0
- package/dist/es/report-html-template.mjs.map +1 -0
- package/dist/es/report-stats.mjs +113 -0
- package/dist/es/report-stats.mjs.map +1 -0
- package/dist/es/screenshot-item.mjs +7 -2
- package/dist/es/screenshot-item.mjs.map +1 -1
- package/dist/es/service/index.mjs +10 -5
- package/dist/es/service/index.mjs.map +1 -1
- package/dist/es/task-runner.mjs.map +1 -1
- package/dist/es/types.mjs.map +1 -1
- package/dist/es/utils.mjs +1 -1
- package/dist/es/yaml/cleanup.mjs +13 -0
- package/dist/es/yaml/cleanup.mjs.map +1 -0
- package/dist/lib/agent/agent.js +24 -11
- package/dist/lib/agent/agent.js.map +1 -1
- package/dist/lib/agent/cache-config.js +53 -0
- package/dist/lib/agent/cache-config.js.map +1 -0
- package/dist/lib/agent/file-chooser.js +125 -0
- package/dist/lib/agent/file-chooser.js.map +1 -0
- package/dist/lib/agent/insight.js +135 -0
- package/dist/lib/agent/insight.js.map +1 -0
- package/dist/lib/agent/metrics.js +115 -0
- package/dist/lib/agent/metrics.js.map +1 -0
- package/dist/lib/agent/progress/ai-act-progress.js +239 -0
- package/dist/lib/agent/progress/ai-act-progress.js.map +1 -0
- package/dist/lib/agent/progress/index.js +67 -0
- package/dist/lib/agent/progress/index.js.map +1 -0
- package/dist/lib/agent/progress/progress-bus.js +86 -0
- package/dist/lib/agent/progress/progress-bus.js.map +1 -0
- package/dist/lib/agent/prompt-context.js +62 -0
- package/dist/lib/agent/prompt-context.js.map +1 -0
- package/dist/lib/agent/record-to-report.js +48 -0
- package/dist/lib/agent/record-to-report.js.map +1 -0
- package/dist/lib/agent/run-gherkin-scenario.js +151 -0
- package/dist/lib/agent/run-gherkin-scenario.js.map +1 -0
- package/dist/lib/agent/run-markdown.js +96 -0
- package/dist/lib/agent/run-markdown.js.map +1 -0
- package/dist/lib/agent/screenshot-preparation.js +74 -0
- package/dist/lib/agent/screenshot-preparation.js.map +1 -0
- package/dist/lib/agent/ui-observer.js +425 -0
- package/dist/lib/agent/ui-observer.js.map +1 -0
- package/dist/lib/agent/utils.js +46 -2
- package/dist/lib/agent/utils.js.map +1 -1
- package/dist/lib/ai-model/connectivity/fixture.js +45 -0
- package/dist/lib/ai-model/connectivity/fixture.js.map +1 -0
- package/dist/lib/ai-model/connectivity/index.js +38 -0
- package/dist/lib/ai-model/connectivity/index.js.map +1 -0
- package/dist/lib/ai-model/connectivity/run-connectivity-test.js +204 -0
- package/dist/lib/ai-model/connectivity/run-connectivity-test.js.map +1 -0
- package/dist/lib/ai-model/conversation-history.js.map +1 -1
- package/dist/lib/ai-model/index.js +15 -11
- package/dist/lib/ai-model/inspect.js +1 -1
- package/dist/lib/ai-model/inspect.js.map +1 -1
- package/dist/lib/ai-model/model-adapter/chat-completion.js +103 -0
- package/dist/lib/ai-model/model-adapter/chat-completion.js.map +1 -0
- package/dist/lib/ai-model/model-adapter/custom-planning-action.js +40 -0
- package/dist/lib/ai-model/model-adapter/custom-planning-action.js.map +1 -0
- package/dist/lib/ai-model/model-adapter/custom-planning-types.js +20 -0
- package/dist/lib/ai-model/model-adapter/custom-planning-types.js.map +1 -0
- package/dist/lib/ai-model/model-adapter/default-insight-protocol.js +62 -0
- package/dist/lib/ai-model/model-adapter/default-insight-protocol.js.map +1 -0
- package/dist/lib/ai-model/model-adapter/default-locate-protocol.js +182 -0
- package/dist/lib/ai-model/model-adapter/default-locate-protocol.js.map +1 -0
- package/dist/lib/ai-model/model-adapter/default-planning-protocol.js +170 -0
- package/dist/lib/ai-model/model-adapter/default-planning-protocol.js.map +1 -0
- package/dist/lib/ai-model/model-adapter/image-preprocess.js +61 -0
- package/dist/lib/ai-model/model-adapter/image-preprocess.js.map +1 -0
- package/dist/lib/ai-model/model-adapter/index.js +38 -0
- package/dist/lib/ai-model/model-adapter/index.js.map +1 -0
- package/dist/lib/ai-model/model-adapter/insight-protocol.js +20 -0
- package/dist/lib/ai-model/model-adapter/insight-protocol.js.map +1 -0
- package/dist/lib/ai-model/model-adapter/insight.js +50 -0
- package/dist/lib/ai-model/model-adapter/insight.js.map +1 -0
- package/dist/lib/ai-model/model-adapter/locate-protocol.js +20 -0
- package/dist/lib/ai-model/model-adapter/locate-protocol.js.map +1 -0
- package/dist/lib/ai-model/model-adapter/locate.js +87 -0
- package/dist/lib/ai-model/model-adapter/locate.js.map +1 -0
- package/dist/lib/ai-model/model-adapter/planning-protocol.js +20 -0
- package/dist/lib/ai-model/model-adapter/planning-protocol.js.map +1 -0
- package/dist/lib/ai-model/model-adapter/planning.js +86 -0
- package/dist/lib/ai-model/model-adapter/planning.js.map +1 -0
- package/dist/lib/ai-model/model-adapter/resolve.js +88 -0
- package/dist/lib/ai-model/model-adapter/resolve.js.map +1 -0
- package/dist/lib/ai-model/model-adapter/types.js +20 -0
- package/dist/lib/ai-model/model-adapter/types.js.map +1 -0
- package/dist/lib/ai-model/models/auto-glm/actions.js +239 -0
- package/dist/lib/ai-model/models/auto-glm/actions.js.map +1 -0
- package/dist/lib/ai-model/models/auto-glm/adapter.js +79 -0
- package/dist/lib/ai-model/models/auto-glm/adapter.js.map +1 -0
- package/dist/lib/ai-model/models/auto-glm/locate.js +45 -0
- package/dist/lib/ai-model/models/auto-glm/locate.js.map +1 -0
- package/dist/lib/ai-model/models/auto-glm/parser.js +260 -0
- package/dist/lib/ai-model/models/auto-glm/parser.js.map +1 -0
- package/dist/lib/ai-model/models/auto-glm/planning.js +67 -0
- package/dist/lib/ai-model/models/auto-glm/planning.js.map +1 -0
- package/dist/lib/ai-model/models/auto-glm/prompt.js +257 -0
- package/dist/lib/ai-model/models/auto-glm/prompt.js.map +1 -0
- package/dist/lib/ai-model/models/deepseek/adapter.js +113 -0
- package/dist/lib/ai-model/models/deepseek/adapter.js.map +1 -0
- package/dist/lib/ai-model/models/deepseek/locate-protocol.js +132 -0
- package/dist/lib/ai-model/models/deepseek/locate-protocol.js.map +1 -0
- package/dist/lib/ai-model/models/default.js +47 -0
- package/dist/lib/ai-model/models/default.js.map +1 -0
- package/dist/lib/ai-model/models/doubao.js +132 -0
- package/dist/lib/ai-model/models/doubao.js.map +1 -0
- package/dist/lib/ai-model/models/gemini.js +137 -0
- package/dist/lib/ai-model/models/gemini.js.map +1 -0
- package/dist/lib/ai-model/models/glm.js +80 -0
- package/dist/lib/ai-model/models/glm.js.map +1 -0
- package/dist/lib/ai-model/models/gpt.js +77 -0
- package/dist/lib/ai-model/models/gpt.js.map +1 -0
- package/dist/lib/ai-model/models/index.js +41 -0
- package/dist/lib/ai-model/models/index.js.map +1 -0
- package/dist/lib/ai-model/models/kimi.js +136 -0
- package/dist/lib/ai-model/models/kimi.js.map +1 -0
- package/dist/lib/ai-model/models/mimo.js +70 -0
- package/dist/lib/ai-model/models/mimo.js.map +1 -0
- package/dist/lib/ai-model/models/qwen.js +173 -0
- package/dist/lib/ai-model/models/qwen.js.map +1 -0
- package/dist/lib/ai-model/models/registry.js +91 -0
- package/dist/lib/ai-model/models/registry.js.map +1 -0
- package/dist/lib/ai-model/models/ui-tars/actions.js +181 -0
- package/dist/lib/ai-model/models/ui-tars/actions.js.map +1 -0
- package/dist/lib/ai-model/models/ui-tars/adapter.js +136 -0
- package/dist/lib/ai-model/models/ui-tars/adapter.js.map +1 -0
- package/dist/lib/ai-model/models/ui-tars/parser.js +74 -0
- package/dist/lib/ai-model/models/ui-tars/parser.js.map +1 -0
- package/dist/lib/ai-model/models/ui-tars/planning.js +59 -0
- package/dist/lib/ai-model/models/ui-tars/planning.js.map +1 -0
- package/dist/lib/ai-model/models/ui-tars/prompt.js +73 -0
- package/dist/lib/ai-model/models/ui-tars/prompt.js.map +1 -0
- package/dist/lib/ai-model/models/utils/intent.js +40 -0
- package/dist/lib/ai-model/models/utils/intent.js.map +1 -0
- package/dist/lib/ai-model/prompt/insight/index.js +45 -0
- package/dist/lib/ai-model/prompt/insight/index.js.map +1 -0
- package/dist/lib/ai-model/prompt/insight/system-prompt.js +138 -0
- package/dist/lib/ai-model/prompt/insight/system-prompt.js.map +1 -0
- package/dist/lib/ai-model/prompt/insight/user-prompt.js +60 -0
- package/dist/lib/ai-model/prompt/insight/user-prompt.js.map +1 -0
- package/dist/lib/ai-model/prompt/locate/element-system-prompt.js +46 -0
- package/dist/lib/ai-model/prompt/locate/element-system-prompt.js.map +1 -0
- package/dist/lib/ai-model/prompt/locate/grounding-rules.js +47 -0
- package/dist/lib/ai-model/prompt/locate/grounding-rules.js.map +1 -0
- package/dist/lib/ai-model/prompt/locate/index.js +46 -0
- package/dist/lib/ai-model/prompt/locate/index.js.map +1 -0
- package/dist/lib/ai-model/prompt/locate/search-area-system-prompt.js +43 -0
- package/dist/lib/ai-model/prompt/locate/search-area-system-prompt.js.map +1 -0
- package/dist/lib/ai-model/prompt/planning/action-output-example.js +92 -0
- package/dist/lib/ai-model/prompt/planning/action-output-example.js.map +1 -0
- package/dist/lib/ai-model/prompt/planning/action-space-description.js +75 -0
- package/dist/lib/ai-model/prompt/planning/action-space-description.js.map +1 -0
- package/dist/lib/ai-model/prompt/planning/index.js +63 -0
- package/dist/lib/ai-model/prompt/planning/index.js.map +1 -0
- package/dist/lib/ai-model/prompt/planning/multi-turn-example.js +255 -0
- package/dist/lib/ai-model/prompt/planning/multi-turn-example.js.map +1 -0
- package/dist/lib/ai-model/prompt/planning/planning-response-example.js +59 -0
- package/dist/lib/ai-model/prompt/planning/planning-response-example.js.map +1 -0
- package/dist/lib/ai-model/prompt/planning/sub-goals-text.js +51 -0
- package/dist/lib/ai-model/prompt/planning/sub-goals-text.js.map +1 -0
- package/dist/lib/ai-model/prompt/planning/system-prompt.js +327 -0
- package/dist/lib/ai-model/prompt/planning/system-prompt.js.map +1 -0
- package/dist/lib/ai-model/service-caller/codex-app-server.js +1 -0
- package/dist/lib/ai-model/service-caller/codex-app-server.js.map +1 -1
- package/dist/lib/ai-model/service-caller/index.js +35 -16
- package/dist/lib/ai-model/service-caller/index.js.map +1 -1
- package/dist/lib/ai-model/service-caller/model-call-recorder.js +124 -0
- package/dist/lib/ai-model/service-caller/model-call-recorder.js.map +1 -0
- package/dist/lib/ai-model/service-caller/openai-error.js +184 -0
- package/dist/lib/ai-model/service-caller/openai-error.js.map +1 -0
- package/dist/lib/ai-model/service-caller/proxy-deps.node.js +46 -0
- package/dist/lib/ai-model/service-caller/proxy-deps.node.js.map +1 -0
- package/dist/lib/ai-model/service-caller/proxy-deps.stub.js +49 -0
- package/dist/lib/ai-model/service-caller/proxy-deps.stub.js.map +1 -0
- package/dist/lib/ai-model/service-caller/semantic-retry.js +70 -0
- package/dist/lib/ai-model/service-caller/semantic-retry.js.map +1 -0
- package/dist/lib/ai-model/service-caller/types.js +20 -0
- package/dist/lib/ai-model/service-caller/types.js.map +1 -0
- package/dist/lib/ai-model/shared/action-schema.js +49 -0
- package/dist/lib/ai-model/shared/action-schema.js.map +1 -0
- package/dist/lib/ai-model/shared/json.js +103 -0
- package/dist/lib/ai-model/shared/json.js.map +1 -0
- package/dist/lib/ai-model/shared/model-locate-result/bbox.js +106 -0
- package/dist/lib/ai-model/shared/model-locate-result/bbox.js.map +1 -0
- package/dist/lib/ai-model/shared/model-locate-result/coordinate-distance.js +44 -0
- package/dist/lib/ai-model/shared/model-locate-result/coordinate-distance.js.map +1 -0
- package/dist/lib/ai-model/shared/model-locate-result/errors.js +46 -0
- package/dist/lib/ai-model/shared/model-locate-result/errors.js.map +1 -0
- package/dist/lib/ai-model/shared/model-locate-result/factory.js +76 -0
- package/dist/lib/ai-model/shared/model-locate-result/factory.js.map +1 -0
- package/dist/lib/ai-model/shared/model-locate-result/index.js +66 -0
- package/dist/lib/ai-model/shared/model-locate-result/index.js.map +1 -0
- package/dist/lib/ai-model/shared/model-locate-result/parse.js +88 -0
- package/dist/lib/ai-model/shared/model-locate-result/parse.js.map +1 -0
- package/dist/lib/ai-model/shared/model-locate-result/pixel-bbox-mapper.js +101 -0
- package/dist/lib/ai-model/shared/model-locate-result/pixel-bbox-mapper.js.map +1 -0
- package/dist/lib/ai-model/shared/model-locate-result/prompt-spec.js +156 -0
- package/dist/lib/ai-model/shared/model-locate-result/prompt-spec.js.map +1 -0
- package/dist/lib/ai-model/shared/model-locate-result/types.js +46 -0
- package/dist/lib/ai-model/shared/model-locate-result/types.js.map +1 -0
- package/dist/lib/ai-model/shared/multimodal-prompt.js +95 -0
- package/dist/lib/ai-model/shared/multimodal-prompt.js.map +1 -0
- package/dist/lib/ai-model/shared/xml.js +79 -0
- package/dist/lib/ai-model/shared/xml.js.map +1 -0
- package/dist/lib/ai-model/workflows/grounding/index.js +46 -0
- package/dist/lib/ai-model/workflows/grounding/index.js.map +1 -0
- package/dist/lib/ai-model/workflows/grounding/locate-result-rect.js +60 -0
- package/dist/lib/ai-model/workflows/grounding/locate-result-rect.js.map +1 -0
- package/dist/lib/ai-model/workflows/grounding/locate.js +208 -0
- package/dist/lib/ai-model/workflows/grounding/locate.js.map +1 -0
- package/dist/lib/ai-model/workflows/grounding/planning-action-locate.js +131 -0
- package/dist/lib/ai-model/workflows/grounding/planning-action-locate.js.map +1 -0
- package/dist/lib/ai-model/workflows/grounding/search-area-mapping.js +52 -0
- package/dist/lib/ai-model/workflows/grounding/search-area-mapping.js.map +1 -0
- package/dist/lib/ai-model/workflows/grounding/search-area.js +92 -0
- package/dist/lib/ai-model/workflows/grounding/search-area.js.map +1 -0
- package/dist/lib/ai-model/workflows/grounding/section-locate.js +180 -0
- package/dist/lib/ai-model/workflows/grounding/section-locate.js.map +1 -0
- package/dist/lib/ai-model/workflows/grounding/types.js +20 -0
- package/dist/lib/ai-model/workflows/grounding/types.js.map +1 -0
- package/dist/lib/ai-model/workflows/grounding/utils.js +87 -0
- package/dist/lib/ai-model/workflows/grounding/utils.js.map +1 -0
- package/dist/lib/ai-model/workflows/insight/extraction.js +135 -0
- package/dist/lib/ai-model/workflows/insight/extraction.js.map +1 -0
- package/dist/lib/ai-model/workflows/insight/index.js +42 -0
- package/dist/lib/ai-model/workflows/insight/index.js.map +1 -0
- package/dist/lib/ai-model/workflows/insight/insight-response-parser.js +60 -0
- package/dist/lib/ai-model/workflows/insight/insight-response-parser.js.map +1 -0
- package/dist/lib/ai-model/workflows/insight/order-sensitive.js +63 -0
- package/dist/lib/ai-model/workflows/insight/order-sensitive.js.map +1 -0
- package/dist/lib/ai-model/workflows/planning/conversation-history.js +219 -0
- package/dist/lib/ai-model/workflows/planning/conversation-history.js.map +1 -0
- package/dist/lib/ai-model/workflows/planning/custom-planning.js +166 -0
- package/dist/lib/ai-model/workflows/planning/custom-planning.js.map +1 -0
- package/dist/lib/ai-model/workflows/planning/index.js +49 -0
- package/dist/lib/ai-model/workflows/planning/index.js.map +1 -0
- package/dist/lib/ai-model/workflows/planning/locate-normalization.js +75 -0
- package/dist/lib/ai-model/workflows/planning/locate-normalization.js.map +1 -0
- package/dist/lib/ai-model/workflows/planning/planning-action-log.js +56 -0
- package/dist/lib/ai-model/workflows/planning/planning-action-log.js.map +1 -0
- package/dist/lib/ai-model/workflows/planning/standard-planning-parser.js +142 -0
- package/dist/lib/ai-model/workflows/planning/standard-planning-parser.js.map +1 -0
- package/dist/lib/ai-model/workflows/planning/standard-planning.js +253 -0
- package/dist/lib/ai-model/workflows/planning/standard-planning.js.map +1 -0
- package/dist/lib/ai-model/workflows/planning/types.js +20 -0
- package/dist/lib/ai-model/workflows/planning/types.js.map +1 -0
- package/dist/lib/ai-model/workflows/recorder-generation/common.js +232 -0
- package/dist/lib/ai-model/workflows/recorder-generation/common.js.map +1 -0
- package/dist/lib/ai-model/workflows/recorder-generation/index.js +68 -0
- package/dist/lib/ai-model/workflows/recorder-generation/index.js.map +1 -0
- package/dist/lib/ai-model/workflows/recorder-generation/markdown.js +293 -0
- package/dist/lib/ai-model/workflows/recorder-generation/markdown.js.map +1 -0
- package/dist/lib/ai-model/workflows/recorder-generation/metadata.js +117 -0
- package/dist/lib/ai-model/workflows/recorder-generation/metadata.js.map +1 -0
- package/dist/lib/ai-model/workflows/recorder-generation/playwright.js +184 -0
- package/dist/lib/ai-model/workflows/recorder-generation/playwright.js.map +1 -0
- package/dist/lib/ai-model/workflows/recorder-generation/yaml.js +232 -0
- package/dist/lib/ai-model/workflows/recorder-generation/yaml.js.map +1 -0
- package/dist/lib/common.js +18 -1
- package/dist/lib/common.js.map +1 -1
- package/dist/lib/constants.js +38 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/device/index.js.map +1 -1
- package/dist/lib/device/input-strategy.js +80 -0
- package/dist/lib/device/input-strategy.js.map +1 -0
- package/dist/lib/dump/html-utils.js +18 -0
- package/dist/lib/dump/html-utils.js.map +1 -1
- package/dist/lib/dump/image-reference.js +115 -0
- package/dist/lib/dump/image-reference.js.map +1 -0
- package/dist/lib/dump/report-action-dump.js +284 -0
- package/dist/lib/dump/report-action-dump.js.map +1 -0
- package/dist/lib/dump/report-dump-compactor.js +234 -0
- package/dist/lib/dump/report-dump-compactor.js.map +1 -0
- package/dist/lib/dump/screenshot-store.js +146 -38
- package/dist/lib/dump/screenshot-store.js.map +1 -1
- package/dist/lib/dump/task-service-dump.js +54 -0
- package/dist/lib/dump/task-service-dump.js.map +1 -0
- package/dist/lib/dump/task-status.js +55 -0
- package/dist/lib/dump/task-status.js.map +1 -0
- package/dist/lib/element-describer.js +238 -0
- package/dist/lib/element-describer.js.map +1 -0
- package/dist/lib/errors.js +54 -0
- package/dist/lib/errors.js.map +1 -0
- package/dist/lib/report-html-template.js +38 -0
- package/dist/lib/report-html-template.js.map +1 -0
- package/dist/lib/report-stats.js +147 -0
- package/dist/lib/report-stats.js.map +1 -0
- package/dist/lib/screenshot-item.js +7 -2
- package/dist/lib/screenshot-item.js.map +1 -1
- package/dist/lib/service/index.js +10 -5
- package/dist/lib/service/index.js.map +1 -1
- package/dist/lib/task-runner.js.map +1 -1
- package/dist/lib/types.js +2 -2
- package/dist/lib/types.js.map +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/lib/yaml/cleanup.js +47 -0
- package/dist/lib/yaml/cleanup.js.map +1 -0
- package/dist/types/agent/agent.d.ts +5 -9
- package/dist/types/agent/cache-config.d.ts +2 -0
- package/dist/types/agent/file-chooser.d.ts +19 -0
- package/dist/types/agent/insight.d.ts +21 -0
- package/dist/types/agent/metrics.d.ts +48 -0
- package/dist/types/agent/progress/ai-act-progress.d.ts +21 -0
- package/dist/types/agent/progress/index.d.ts +2 -0
- package/dist/types/agent/progress/progress-bus.d.ts +33 -0
- package/dist/types/agent/prompt-context.d.ts +3 -0
- package/dist/types/agent/record-to-report.d.ts +2 -0
- package/dist/types/agent/run-gherkin-scenario.d.ts +26 -0
- package/dist/types/agent/run-markdown.d.ts +6 -0
- package/dist/types/agent/screenshot-preparation.d.ts +20 -0
- package/dist/types/agent/ui-observer.d.ts +103 -0
- package/dist/types/agent/utils.d.ts +12 -1
- package/dist/types/ai-model/connectivity/fixture.d.ts +5 -0
- package/dist/types/ai-model/connectivity/index.d.ts +1 -0
- package/dist/types/ai-model/connectivity/run-connectivity-test.d.ts +11 -0
- package/dist/types/ai-model/index.d.ts +2 -0
- package/dist/types/ai-model/model-adapter/chat-completion.d.ts +2 -0
- package/dist/types/ai-model/model-adapter/custom-planning-action.d.ts +25 -0
- package/dist/types/ai-model/model-adapter/custom-planning-types.d.ts +31 -0
- package/dist/types/ai-model/model-adapter/default-insight-protocol.d.ts +2 -0
- package/dist/types/ai-model/model-adapter/default-locate-protocol.d.ts +7 -0
- package/dist/types/ai-model/model-adapter/default-planning-protocol.d.ts +25 -0
- package/dist/types/ai-model/model-adapter/image-preprocess.d.ts +30 -0
- package/dist/types/ai-model/model-adapter/index.d.ts +2 -0
- package/dist/types/ai-model/model-adapter/insight-protocol.d.ts +24 -0
- package/dist/types/ai-model/model-adapter/insight.d.ts +3 -0
- package/dist/types/ai-model/model-adapter/locate-protocol.d.ts +23 -0
- package/dist/types/ai-model/model-adapter/locate.d.ts +4 -0
- package/dist/types/ai-model/model-adapter/planning-protocol.d.ts +53 -0
- package/dist/types/ai-model/model-adapter/planning.d.ts +6 -0
- package/dist/types/ai-model/model-adapter/resolve.d.ts +12 -0
- package/dist/types/ai-model/model-adapter/types.d.ts +218 -0
- package/dist/types/ai-model/models/auto-glm/actions.d.ts +81 -0
- package/dist/types/ai-model/models/auto-glm/adapter.d.ts +5 -0
- package/dist/types/ai-model/models/auto-glm/locate.d.ts +2 -0
- package/dist/types/ai-model/models/auto-glm/parser.d.ts +14 -0
- package/dist/types/ai-model/models/auto-glm/planning.d.ts +5 -0
- package/dist/types/ai-model/models/auto-glm/prompt.d.ts +4 -0
- package/dist/types/ai-model/models/deepseek/adapter.d.ts +39 -0
- package/dist/types/ai-model/models/deepseek/locate-protocol.d.ts +5 -0
- package/dist/types/ai-model/models/default.d.ts +2 -0
- package/dist/types/ai-model/models/doubao.d.ts +7 -0
- package/dist/types/ai-model/models/gemini.d.ts +37 -0
- package/dist/types/ai-model/models/glm.d.ts +21 -0
- package/dist/types/ai-model/models/gpt.d.ts +20 -0
- package/dist/types/ai-model/models/index.d.ts +2 -0
- package/dist/types/ai-model/models/kimi.d.ts +45 -0
- package/dist/types/ai-model/models/mimo.d.ts +10 -0
- package/dist/types/ai-model/models/qwen.d.ts +33 -0
- package/dist/types/ai-model/models/registry.d.ts +187 -0
- package/dist/types/ai-model/models/ui-tars/actions.d.ts +3 -0
- package/dist/types/ai-model/models/ui-tars/adapter.d.ts +6 -0
- package/dist/types/ai-model/models/ui-tars/parser.d.ts +72 -0
- package/dist/types/ai-model/models/ui-tars/planning.d.ts +4 -0
- package/dist/types/ai-model/models/ui-tars/prompt.d.ts +2 -0
- package/dist/types/ai-model/models/utils/intent.d.ts +2 -0
- package/dist/types/ai-model/prompt/insight/index.d.ts +2 -0
- package/dist/types/ai-model/prompt/insight/system-prompt.d.ts +6 -0
- package/dist/types/ai-model/prompt/insight/user-prompt.d.ts +3 -0
- package/dist/types/ai-model/prompt/locate/element-system-prompt.d.ts +4 -0
- package/dist/types/ai-model/prompt/locate/grounding-rules.d.ts +1 -0
- package/dist/types/ai-model/prompt/locate/index.d.ts +3 -0
- package/dist/types/ai-model/prompt/locate/search-area-system-prompt.d.ts +4 -0
- package/dist/types/ai-model/prompt/planning/action-output-example.d.ts +17 -0
- package/dist/types/ai-model/prompt/planning/action-space-description.d.ts +11 -0
- package/dist/types/ai-model/prompt/planning/index.d.ts +6 -0
- package/dist/types/ai-model/prompt/planning/multi-turn-example.d.ts +10 -0
- package/dist/types/ai-model/prompt/planning/planning-response-example.d.ts +28 -0
- package/dist/types/ai-model/prompt/planning/sub-goals-text.d.ts +2 -0
- package/dist/types/ai-model/prompt/planning/system-prompt.d.ts +18 -0
- package/dist/types/ai-model/service-caller/index.d.ts +21 -6
- package/dist/types/ai-model/service-caller/model-call-recorder.d.ts +12 -0
- package/dist/types/ai-model/service-caller/openai-error.d.ts +26 -0
- package/dist/types/ai-model/service-caller/proxy-deps.node.d.ts +2 -0
- package/dist/types/ai-model/service-caller/proxy-deps.stub.d.ts +2 -0
- package/dist/types/ai-model/service-caller/semantic-retry.d.ts +30 -0
- package/dist/types/ai-model/service-caller/types.d.ts +2 -0
- package/dist/types/ai-model/shared/action-schema.d.ts +4 -0
- package/dist/types/ai-model/shared/json.d.ts +26 -0
- package/dist/types/ai-model/shared/model-locate-result/bbox.d.ts +6 -0
- package/dist/types/ai-model/shared/model-locate-result/coordinate-distance.d.ts +4 -0
- package/dist/types/ai-model/shared/model-locate-result/errors.d.ts +2 -0
- package/dist/types/ai-model/shared/model-locate-result/factory.d.ts +3 -0
- package/dist/types/ai-model/shared/model-locate-result/index.d.ts +7 -0
- package/dist/types/ai-model/shared/model-locate-result/parse.d.ts +8 -0
- package/dist/types/ai-model/shared/model-locate-result/pixel-bbox-mapper.d.ts +7 -0
- package/dist/types/ai-model/shared/model-locate-result/prompt-spec.d.ts +6 -0
- package/dist/types/ai-model/shared/model-locate-result/types.d.ts +150 -0
- package/dist/types/ai-model/shared/multimodal-prompt.d.ts +13 -0
- package/dist/types/ai-model/shared/xml.d.ts +15 -0
- package/dist/types/ai-model/workflows/grounding/index.d.ts +3 -0
- package/dist/types/ai-model/workflows/grounding/locate-result-rect.d.ts +5 -0
- package/dist/types/ai-model/workflows/grounding/locate.d.ts +7 -0
- package/dist/types/ai-model/workflows/grounding/planning-action-locate.d.ts +4 -0
- package/dist/types/ai-model/workflows/grounding/search-area-mapping.d.ts +4 -0
- package/dist/types/ai-model/workflows/grounding/search-area.d.ts +18 -0
- package/dist/types/ai-model/workflows/grounding/section-locate.d.ts +16 -0
- package/dist/types/ai-model/workflows/grounding/types.d.ts +56 -0
- package/dist/types/ai-model/workflows/grounding/utils.d.ts +25 -0
- package/dist/types/ai-model/workflows/insight/extraction.d.ts +18 -0
- package/dist/types/ai-model/workflows/insight/index.d.ts +2 -0
- package/dist/types/ai-model/workflows/insight/insight-response-parser.d.ts +4 -0
- package/dist/types/ai-model/workflows/insight/order-sensitive.d.ts +6 -0
- package/dist/types/ai-model/workflows/planning/conversation-history.d.ts +105 -0
- package/dist/types/ai-model/workflows/planning/custom-planning.d.ts +7 -0
- package/dist/types/ai-model/workflows/planning/index.d.ts +3 -0
- package/dist/types/ai-model/workflows/planning/locate-normalization.d.ts +12 -0
- package/dist/types/ai-model/workflows/planning/planning-action-log.d.ts +2 -0
- package/dist/types/ai-model/workflows/planning/standard-planning-parser.d.ts +31 -0
- package/dist/types/ai-model/workflows/planning/standard-planning.d.ts +4 -0
- package/dist/types/ai-model/workflows/planning/types.d.ts +16 -0
- package/dist/types/ai-model/workflows/recorder-generation/common.d.ts +89 -0
- package/dist/types/ai-model/workflows/recorder-generation/index.d.ts +7 -0
- package/dist/types/ai-model/workflows/recorder-generation/markdown.d.ts +7 -0
- package/dist/types/ai-model/workflows/recorder-generation/metadata.d.ts +13 -0
- package/dist/types/ai-model/workflows/recorder-generation/playwright.d.ts +26 -0
- package/dist/types/ai-model/workflows/recorder-generation/yaml.d.ts +17 -0
- package/dist/types/common.d.ts +2 -0
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/device/index.d.ts +15 -4
- package/dist/types/device/input-strategy.d.ts +44 -0
- package/dist/types/dump/html-utils.d.ts +1 -0
- package/dist/types/dump/image-reference.d.ts +36 -0
- package/dist/types/dump/report-action-dump.d.ts +127 -0
- package/dist/types/dump/report-dump-compactor.d.ts +7 -0
- package/dist/types/dump/screenshot-store.d.ts +32 -15
- package/dist/types/dump/task-service-dump.d.ts +3 -0
- package/dist/types/dump/task-status.d.ts +41 -0
- package/dist/types/element-describer.d.ts +43 -0
- package/dist/types/errors.d.ts +5 -0
- package/dist/types/report-html-template.d.ts +1 -0
- package/dist/types/report-stats.d.ts +39 -0
- package/dist/types/screenshot-item.d.ts +1 -0
- package/dist/types/service/index.d.ts +6 -2
- package/dist/types/task-runner.d.ts +6 -0
- package/dist/types/types.d.ts +98 -5
- package/dist/types/yaml/cleanup.d.ts +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
buildStandardPlanningSystemPrompt: ()=>buildStandardPlanningSystemPrompt
|
|
28
|
+
});
|
|
29
|
+
const env_namespaceObject = require("@aiscene/shared/env");
|
|
30
|
+
const errors_js_namespaceObject = require("../../shared/model-locate-result/errors.js");
|
|
31
|
+
const index_js_namespaceObject = require("../locate/index.js");
|
|
32
|
+
const external_action_output_example_js_namespaceObject = require("./action-output-example.js");
|
|
33
|
+
const external_action_space_description_js_namespaceObject = require("./action-space-description.js");
|
|
34
|
+
const external_multi_turn_example_js_namespaceObject = require("./multi-turn-example.js");
|
|
35
|
+
async function buildStandardPlanningSystemPrompt(input) {
|
|
36
|
+
const { actionSpace, includeLocateInPlanning, locatePromptSpec, includeSubGoals, includeThought = true, includeLog = true, planningProtocol } = input;
|
|
37
|
+
const actionOutputProtocol = planningProtocol.actionOutputProtocol;
|
|
38
|
+
const preferredLanguage = (0, env_namespaceObject.getPreferredLanguage)();
|
|
39
|
+
if (includeLocateInPlanning && !locatePromptSpec) throw new Error((0, errors_js_namespaceObject.planningModelFamilyRequiredForLocateMessage)());
|
|
40
|
+
const actionSpaceDescription = (0, external_action_space_description_js_namespaceObject.buildPlanningActionSpaceDescription)({
|
|
41
|
+
actionSpace,
|
|
42
|
+
locatePromptSpec,
|
|
43
|
+
planningProtocol
|
|
44
|
+
});
|
|
45
|
+
const hasRunAdbShell = actionSpace.some((action)=>'RunAdbShell' === action.name);
|
|
46
|
+
const actionOutputTagsText = actionOutputProtocol.actionOutputTagNames.map((tagName)=>`<${tagName}>`).join(', ');
|
|
47
|
+
const shouldIncludeSubGoals = includeSubGoals ?? false;
|
|
48
|
+
const renderSubGoalsContent = (content, fallbackContent = '')=>shouldIncludeSubGoals ? content : fallbackContent;
|
|
49
|
+
const renderThoughtContent = (content, fallbackContent = '')=>includeThought ? content : fallbackContent;
|
|
50
|
+
const renderLogContent = (content, fallbackContent = '')=>includeLog ? content : fallbackContent;
|
|
51
|
+
const completionCheckStepNumber = shouldIncludeSubGoals ? 3 : 2;
|
|
52
|
+
const actionStepNumber = completionCheckStepNumber + 1;
|
|
53
|
+
return `
|
|
54
|
+
Target: You are an expert to manipulate the UI to accomplish the user's instruction. User will give you an instruction, some screenshots, background knowledge and previous logs indicating what have been done. Your task is to accomplish the instruction by thinking through the path to complete the task and give the next action to execute.
|
|
55
|
+
|
|
56
|
+
## Step 1: ${renderSubGoalsContent('Observe and Plan (related tags: <planning>, <update-plan-content>, <mark-sub-goal-done>)', renderThoughtContent('Observe (related tags: <planning>)', 'Observe'))}
|
|
57
|
+
|
|
58
|
+
First, observe the current screenshot and previous logs${renderSubGoalsContent(", then break down the user's instruction into multiple high-level sub-goals. Update the status of sub-goals based on what you see in the current screenshot.", ' to understand the current state.')}
|
|
59
|
+
|
|
60
|
+
${renderSubGoalsContent(`### Observation Guidelines
|
|
61
|
+
|
|
62
|
+
- Treat visible summaries, thumbnails, cropped content, and partially visible lists as potentially incomplete when the task depends on precise details.
|
|
63
|
+
- If the current view does not provide enough information to decide safely, use available UI affordances such as opening details, expanding content, previewing, enlarging, zooming, or scrolling before acting.`)}
|
|
64
|
+
|
|
65
|
+
${renderThoughtContent(`### <planning> tag (REQUIRED)
|
|
66
|
+
|
|
67
|
+
REQUIRED: You MUST always output the <planning> tag. Never skip it.
|
|
68
|
+
|
|
69
|
+
Write the content of the <planning> tag in ${preferredLanguage}.
|
|
70
|
+
|
|
71
|
+
Include your planning details in the <planning> tag. It should answer: ${renderSubGoalsContent("What is the user's requirement? What is the current state based on the screenshot? Are all sub-goals completed? If not, what should be the next action?", 'What is the current state based on the screenshot? What should be the next action?')} Write it naturally without numbering or section headers.
|
|
72
|
+
|
|
73
|
+
CRITICAL - Following Explicit Instructions: When the user gives you specific operation steps (not high-level goals), you MUST execute ONLY those exact steps - nothing more, nothing less. Do NOT add extra actions even if they seem logical. For example: "fill out the form" means only fill fields, do NOT submit; "click the button" means only click, do NOT wait for page load or verify results; "type 'hello'" means only type, do NOT press Enter.`)}
|
|
74
|
+
|
|
75
|
+
${renderSubGoalsContent(`### <update-plan-content> tag
|
|
76
|
+
|
|
77
|
+
Use this structure to give or update your plan:
|
|
78
|
+
|
|
79
|
+
<update-plan-content>
|
|
80
|
+
<sub-goal index="1" status="finished|pending">sub goal description</sub-goal>
|
|
81
|
+
<sub-goal index="2" status="finished|pending">sub goal description</sub-goal>
|
|
82
|
+
...
|
|
83
|
+
</update-plan-content>
|
|
84
|
+
|
|
85
|
+
### <mark-sub-goal-done> tag
|
|
86
|
+
|
|
87
|
+
Use this structure to mark a sub-goal as done:
|
|
88
|
+
|
|
89
|
+
<mark-sub-goal-done>
|
|
90
|
+
<sub-goal index="1" status="finished" />
|
|
91
|
+
</mark-sub-goal-done>
|
|
92
|
+
|
|
93
|
+
IMPORTANT: You MUST only mark a sub-goal as "finished" AFTER you have confirmed the task is actually completed by observing the result in the screenshot. Do NOT mark a sub-goal as done just because you expect the next action will complete it. Wait until you see visual confirmation in the screenshot that the sub-goal has been achieved.
|
|
94
|
+
|
|
95
|
+
### Note
|
|
96
|
+
|
|
97
|
+
During execution, you can call <update-plan-content> at any time to update the plan based on the latest screenshot and completed sub-goals.
|
|
98
|
+
|
|
99
|
+
### Example
|
|
100
|
+
|
|
101
|
+
If the user wants to "log in to a system using username and password, complete all to-do items, and submit a registration form", you can break it down into the following sub-goals:
|
|
102
|
+
|
|
103
|
+
<planning>...</planning>
|
|
104
|
+
<update-plan-content>
|
|
105
|
+
<sub-goal index="1" status="pending">Log in to the system</sub-goal>
|
|
106
|
+
<sub-goal index="2" status="pending">Complete all to-do items</sub-goal>
|
|
107
|
+
<sub-goal index="3" status="pending">Submit the registration form</sub-goal>
|
|
108
|
+
</update-plan-content>
|
|
109
|
+
|
|
110
|
+
After logging in and seeing the to-do items, you can mark the sub-goal as done:
|
|
111
|
+
|
|
112
|
+
<mark-sub-goal-done>
|
|
113
|
+
<sub-goal index="1" status="finished" />
|
|
114
|
+
</mark-sub-goal-done>
|
|
115
|
+
|
|
116
|
+
At this point, the status of all sub-goals is:
|
|
117
|
+
|
|
118
|
+
<update-plan-content>
|
|
119
|
+
<sub-goal index="1" status="finished" />
|
|
120
|
+
<sub-goal index="2" status="pending" />
|
|
121
|
+
<sub-goal index="3" status="pending" />
|
|
122
|
+
</update-plan-content>
|
|
123
|
+
|
|
124
|
+
After some time, when the last sub-goal is also completed, you can mark it as done as well:
|
|
125
|
+
|
|
126
|
+
<mark-sub-goal-done>
|
|
127
|
+
<sub-goal index="3" status="finished" />
|
|
128
|
+
</mark-sub-goal-done>`)}
|
|
129
|
+
|
|
130
|
+
${renderSubGoalsContent(`## Step 2: Memory Data from Current Screenshot (related tags: <memory>)
|
|
131
|
+
|
|
132
|
+
Use <memory> to record clear, task-relevant information from the current screenshot that may be needed in later steps. The current screenshot will not be available later, so memory should preserve enough detail for future reasoning, verification, or action.
|
|
133
|
+
|
|
134
|
+
- Record information completely and exactly as shown. Do not summarize, translate, normalize, or merge values that may matter later.
|
|
135
|
+
- When recording an item, include the item itself, its exact task-relevant details, and the visible cue or UI context that identifies where it came from when relevant.
|
|
136
|
+
- Keep similar or repeated items as separate memory entries unless their task-relevant details are confirmed to be the same.
|
|
137
|
+
- After navigation, scrolling, editing, deletion, saving, or other screen changes, treat remembered positions, order, indexes, and UI bindings as references only. Re-check the current screen before acting on them.
|
|
138
|
+
|
|
139
|
+
Examples:
|
|
140
|
+
- If you need to find an item and later assert its details, record the item name and the exact details needed for the assertion, such as status, price, date, owner, description, or other visible fields.
|
|
141
|
+
- If you need to compare multiple similar results, record each candidate separately with its exact distinguishing details and visible context.
|
|
142
|
+
- If you need to copy information from one place to another, record the exact source value and the target field or UI cue it should be mapped to.
|
|
143
|
+
|
|
144
|
+
Don't use this tag if no information needs to be preserved.`)}
|
|
145
|
+
|
|
146
|
+
## Step ${completionCheckStepNumber}: ${renderSubGoalsContent('Check if Goal is Accomplished', 'Check if the Instruction is Fulfilled')} (related tags: <complete>)
|
|
147
|
+
|
|
148
|
+
Determine if the entire task is completed${renderSubGoalsContent(' based on the current screenshot and the status of all sub-goals')}.
|
|
149
|
+
|
|
150
|
+
### CRITICAL: The User's Instruction is the Supreme Authority
|
|
151
|
+
|
|
152
|
+
The user's instruction defines the EXACT scope of what you must accomplish. You MUST follow it precisely - nothing more, nothing less. Violating this rule may cause severe consequences such as data loss, unintended operations, or system failures.
|
|
153
|
+
|
|
154
|
+
**Explicit instructions vs. High-level goals:**
|
|
155
|
+
- If the user gives you **explicit operation steps** (e.g., "click X", "type Y", "fill out the form"), treat them as exact commands. Execute ONLY those steps, nothing more.
|
|
156
|
+
- If the user gives you a **high-level goal** (e.g., "log in to the system", "complete the purchase"), you may determine the necessary steps to achieve it.
|
|
157
|
+
|
|
158
|
+
**What "${renderSubGoalsContent('goal accomplished', 'instruction fulfilled')}" means:**
|
|
159
|
+
- The ${renderSubGoalsContent('goal is accomplished', 'instruction is fulfilled')} when you have done EXACTLY what the user asked - no extra steps, no assumptions.
|
|
160
|
+
- Do NOT perform any action beyond the explicit instruction, even if it seems logical or helpful.
|
|
161
|
+
|
|
162
|
+
**Examples - Explicit instructions (execute exactly, no extra steps):**
|
|
163
|
+
- "fill out the form" → ${renderSubGoalsContent('Goal accomplished', 'Instruction fulfilled')} when all fields are filled. Do NOT submit the form.
|
|
164
|
+
- "click the login button" → ${renderSubGoalsContent('Goal accomplished', 'Instruction fulfilled')} once clicked. Do NOT wait for page load or verify login success.
|
|
165
|
+
- "type 'hello' in the search box" → ${renderSubGoalsContent('Goal accomplished', 'Instruction fulfilled')} when 'hello' is typed. Do NOT press Enter or trigger search.
|
|
166
|
+
- "select the first item" → ${renderSubGoalsContent('Goal accomplished', 'Instruction fulfilled')} when selected. Do NOT proceed to checkout.
|
|
167
|
+
|
|
168
|
+
**Change completion:**
|
|
169
|
+
- If the requested outcome is a durable change, such as create, edit, update, delete, save, send, submit, apply, or publish, do not stop at an unsaved draft, open editor, temporary input, transient selection, or staged value. Continue through the app/page's normal completion control such as Save, Done, Confirm, OK, Submit, Apply, Send, or Publish before completing, so the result remains after leaving the screen.
|
|
170
|
+
- If the user only asks for an intermediate UI state, such as typing text, selecting an option, filling fields, or opening a screen without saving/submitting/applying, stop once that exact state is reached.
|
|
171
|
+
|
|
172
|
+
**Special case - Scrollable option lists and dropdowns:**
|
|
173
|
+
- When choosing an item from a scrollable select, dropdown, listbox, menu, or similar option list, first open the control if it is closed. Once the list is open, interact with the list itself, not the page.
|
|
174
|
+
- If the target option is visible in the open list, Tap that exact option immediately.
|
|
175
|
+
- If the list is open but the target option is not visible, try to find it by scrolling the open list/dropdown before giving up or interacting with other elements.
|
|
176
|
+
- For an open dropdown/list, prefer small incremental Scroll actions with an explicit distance (typically 50-120 pixels) and a locate target describing the open list/dropdown. Do NOT omit distance while searching within a list, because the default scroll distance can skip over relevant options and cause oscillation.
|
|
177
|
+
- While searching within an open dropdown/list, use short scrolls so intermediate options are not skipped.
|
|
178
|
+
- After selecting the target, if the trigger text or result text shows the requested option, treat the current selection step as fulfilled and continue evaluating the remaining user instruction.
|
|
179
|
+
|
|
180
|
+
**Special case - Text hidden by a narrow input field:**
|
|
181
|
+
- CRITICAL PRIORITY OVERRIDE - Input verification after an input action:
|
|
182
|
+
- This rule overrides the general requirement to verify the exact target text from the screenshot.
|
|
183
|
+
- If the previous step already executed an input action, and the current input field is not empty, you MUST directly treat that input as successful.
|
|
184
|
+
- In this situation, do NOT use the visible text in the screenshot to decide that the input is incomplete, incorrect, missing characters, out of order, or needs correction.
|
|
185
|
+
- Do NOT perform ClearInput, another Input, KeyboardPress, or any other action intended to "fix the input content" just because the visible text looks different from the target text, has abnormal character order, missing characters, abnormal spacing, suspicious visual recognition results, or appears to have selected/highlighted text.
|
|
186
|
+
- The general rule "do EXACTLY what the user asked" still applies to the intended input value you execute, but it MUST NOT be enforced by re-validating the visible text in the screenshot after the input action.
|
|
187
|
+
- Differences in visible text must be assumed to be caused by clipping, horizontal scrolling, narrow input fields, text selection, caret position, or visual recognition errors rather than input failure.
|
|
188
|
+
- Retry input only when the input field is clearly still empty, or when the page shows an explicit error message.
|
|
189
|
+
|
|
190
|
+
**Special case - Assertion instructions:**
|
|
191
|
+
- If the user's instruction includes an assertion (e.g., "verify that...", "check that...", "assert..."), and you observe from the screenshot that the assertion condition is NOT satisfied and cannot be satisfied, mark ${renderSubGoalsContent('the goal', 'it')} as failed (success="false").
|
|
192
|
+
- If the page is still loading (e.g., you see a loading spinner, skeleton screen, or progress bar), do NOT assert yet. Wait for the page to finish loading before evaluating the assertion.
|
|
193
|
+
|
|
194
|
+
### Completion Criteria for Process-required Instructions
|
|
195
|
+
|
|
196
|
+
If the user's instruction includes explicit operation steps, ordering requirements, or action requirements, it is a process-required instruction.
|
|
197
|
+
|
|
198
|
+
For process-required instructions, do NOT treat the task as complete only because the current screenshot already shows the final expected state. Do NOT infer that earlier steps were executed from the final UI state.
|
|
199
|
+
|
|
200
|
+
You may output <complete success="true"> only when the current execution history, previous logs, or the screenshot after the most recent action proves that every explicit step required by the user has been completed, and the final check condition is also satisfied.
|
|
201
|
+
|
|
202
|
+
If any explicit step lacks completion evidence in the current execution history, continue with the next missing step instead of outputting <complete>, even if the current screenshot appears to satisfy the final condition.
|
|
203
|
+
|
|
204
|
+
${renderSubGoalsContent('', `**Page navigation restriction:**
|
|
205
|
+
- Unless the user's instruction explicitly asks you to click a link, jump to another page, or navigate to a URL, you MUST complete the task on the current page only.
|
|
206
|
+
- Do NOT navigate away from the current page on your own initiative (e.g., do not click links that lead to other pages, do not use browser back/forward, do not open new URLs).
|
|
207
|
+
- If the task cannot be accomplished on the current page and the user has not instructed you to navigate, report it as a failure (success="false") instead of attempting to navigate to other pages.`)}
|
|
208
|
+
|
|
209
|
+
### Output Rules
|
|
210
|
+
|
|
211
|
+
- If the task is NOT complete, skip this section and continue to Step ${actionStepNumber}.
|
|
212
|
+
- Use the <complete success="true|false">message</complete> tag to output the result if the goal is accomplished or failed.
|
|
213
|
+
- the 'success' attribute is required. ${renderSubGoalsContent('It means whether the expected goal is accomplished based on what you observe in the current screenshot and the current execution history. ')}No matter what errors occurred during execution, set success="true" only when the current execution history shows that all steps required by the user have been completed and the final state satisfies the requirement. If the user asks for explicit operation steps or an ordered workflow, do not treat those steps as completed only because the current screenshot already shows the final expected state. If the ${renderSubGoalsContent('expected goal is not accomplished and cannot be accomplished', 'instruction is not fulfilled and cannot be fulfilled')}, set success="false".
|
|
214
|
+
- the 'message' is the information that will be provided to the user. If the user asks for a specific format, strictly follow that.
|
|
215
|
+
- If you output <complete>, do NOT output ${actionOutputTagsText}. The task ends here.
|
|
216
|
+
|
|
217
|
+
## Step ${actionStepNumber}: Determine Next Action (related tags: ${renderLogContent('<log>, ')}${actionOutputTagsText}, <error>)
|
|
218
|
+
|
|
219
|
+
ONLY if the task is not complete: Think what the next action is according to the current screenshot${renderSubGoalsContent(' and the plan')}.
|
|
220
|
+
|
|
221
|
+
- Don't give extra actions or plans beyond the instruction or the plan. For example, don't try to submit the form if the instruction is only to fill something.
|
|
222
|
+
- Consider the current screenshot and give the action that is most likely to accomplish the instruction. For example, if the next step is to click a button but it's not visible in the screenshot, you should try to find it first instead of give a click action.
|
|
223
|
+
- Make sure the previous actions are completed successfully. Otherwise, retry or do something else to recover.
|
|
224
|
+
- Give just the next ONE action you should do (if any)
|
|
225
|
+
- If there are some error messages reported by the previous actions, don't give up, try parse a new action to recover. If the error persists for more than 3 times, you should think this is an error and set the "error" field to the error message.
|
|
226
|
+
|
|
227
|
+
### Action Guidelines
|
|
228
|
+
|
|
229
|
+
${hasRunAdbShell ? "- If the user's task can be completed with the RunAdbShell action, prefer using the RunAdbShell action." : ''}
|
|
230
|
+
- For touch continuous controls that set a value along a track, such as a slider, prefer Swipe from the current handle or filled position to the requested track endpoint instead of tapping the endpoint.
|
|
231
|
+
- When editing existing text in a UI field, preserve all existing text by moving the cursor and typing/deleting the minimal necessary characters.
|
|
232
|
+
- For insert/prepend/append edits, use CursorMove when the caret must be adjusted precisely, then use Input with mode "typeOnly" for inserted characters and KeyboardPress for newlines or deletion. If the caret lands in the wrong position, recover with CursorMove, KeyboardPress, or undo and retry cursor placement; do not switch to replace as a fallback for cursor placement failures.
|
|
233
|
+
|
|
234
|
+
${includeLocateInPlanning ? (0, index_js_namespaceObject.locateGroundingRules)() : ''}
|
|
235
|
+
|
|
236
|
+
### ${planningProtocol.actionSpaceProtocol.title}
|
|
237
|
+
|
|
238
|
+
${actionSpaceDescription}
|
|
239
|
+
|
|
240
|
+
${renderLogContent(`### Log to give user feedback (preamble message)
|
|
241
|
+
|
|
242
|
+
The <log> tag is a brief preamble message to the user explaining what you're about to do. It should follow these principles and examples:
|
|
243
|
+
|
|
244
|
+
- **Use ${preferredLanguage}**
|
|
245
|
+
- **Keep it concise**: be no more than 1-2 sentences, focused on immediate, tangible next steps. (8–12 words or Chinese characters for quick updates).
|
|
246
|
+
- **Build on prior context**: if this is not the first action to be done, use the preamble message to connect the dots with what's been done so far and create a sense of momentum and clarity for the user to understand your next actions.
|
|
247
|
+
- **Keep your tone light, friendly and curious**: add small touches of personality in preambles feel collaborative and engaging.
|
|
248
|
+
|
|
249
|
+
**Examples:**
|
|
250
|
+
- <log>Click the login button</log>
|
|
251
|
+
- <log>Scroll to find the 'Yes' button in popup</log>
|
|
252
|
+
- <log>Previous actions failed to find the 'Yes' button, i will try again</log>
|
|
253
|
+
- <log>Go back to find the login button</log>`)}
|
|
254
|
+
|
|
255
|
+
### If there is some action to do ...
|
|
256
|
+
|
|
257
|
+
${actionOutputProtocol.actionOutputRules}
|
|
258
|
+
|
|
259
|
+
For example:
|
|
260
|
+
${(0, external_action_output_example_js_namespaceObject.buildActionOutputExample)((0, external_action_output_example_js_namespaceObject.createSampleTapAction)('Add to cart button for Sauce Labs Backpack'), {
|
|
261
|
+
locatePromptSpec,
|
|
262
|
+
locateResultExampleIndex: 1,
|
|
263
|
+
buildActionOutput: actionOutputProtocol.buildActionOutput
|
|
264
|
+
})}
|
|
265
|
+
|
|
266
|
+
### If you think there is an error ...
|
|
267
|
+
|
|
268
|
+
- Use the <error> tag to output the error message.
|
|
269
|
+
|
|
270
|
+
For example:
|
|
271
|
+
<error>Unable to find the required element on the page</error>
|
|
272
|
+
|
|
273
|
+
### If there is no action to do ...
|
|
274
|
+
|
|
275
|
+
- Don't output ${actionOutputTagsText} if there is no action to do.
|
|
276
|
+
|
|
277
|
+
## Return Format
|
|
278
|
+
|
|
279
|
+
Return in XML format following this decision flow:
|
|
280
|
+
|
|
281
|
+
${planningProtocol.responsePrefix ?? ''}
|
|
282
|
+
|
|
283
|
+
${renderThoughtContent(`**Always include (REQUIRED):**
|
|
284
|
+
<!-- Step 1: Observe and Plan -->
|
|
285
|
+
<planning>Your planning details here. NEVER skip this tag.</planning>`)}
|
|
286
|
+
${renderSubGoalsContent(`<!-- required when no update-plan-content is provided in the previous response -->
|
|
287
|
+
<update-plan-content>...</update-plan-content>
|
|
288
|
+
|
|
289
|
+
<!-- required when any sub-goal is completed -->
|
|
290
|
+
<mark-sub-goal-done>
|
|
291
|
+
<sub-goal index="1" status="finished" />
|
|
292
|
+
</mark-sub-goal-done>
|
|
293
|
+
|
|
294
|
+
<!-- Step 2: Memory data from current screenshot if needed -->
|
|
295
|
+
<memory>...</memory>`)}
|
|
296
|
+
|
|
297
|
+
**Then choose ONE of the following paths:**
|
|
298
|
+
|
|
299
|
+
**Path A: If the ${renderSubGoalsContent('goal is accomplished', 'instruction is fulfilled')} or failed (Step ${completionCheckStepNumber})**
|
|
300
|
+
<complete success="true|false">...</complete>
|
|
301
|
+
|
|
302
|
+
**Path B: If the ${renderSubGoalsContent('goal is NOT complete', 'instruction is NOT fulfilled')} yet (Step ${actionStepNumber})**
|
|
303
|
+
<!-- Determine next action -->
|
|
304
|
+
${renderLogContent('<log>...</log>')}
|
|
305
|
+
${actionOutputProtocol.actionOutputPlaceholder}
|
|
306
|
+
|
|
307
|
+
<!-- OR if there's an error -->
|
|
308
|
+
<error>...</error>
|
|
309
|
+
|
|
310
|
+
${(0, external_multi_turn_example_js_namespaceObject.buildPlanningMultiTurnExample)({
|
|
311
|
+
includeSubGoals: shouldIncludeSubGoals,
|
|
312
|
+
includeThought,
|
|
313
|
+
includeLog,
|
|
314
|
+
locatePromptSpec,
|
|
315
|
+
actionOutputProtocol,
|
|
316
|
+
prefix: planningProtocol.responsePrefix
|
|
317
|
+
})}`;
|
|
318
|
+
}
|
|
319
|
+
exports.buildStandardPlanningSystemPrompt = __webpack_exports__.buildStandardPlanningSystemPrompt;
|
|
320
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
321
|
+
"buildStandardPlanningSystemPrompt"
|
|
322
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
323
|
+
Object.defineProperty(exports, '__esModule', {
|
|
324
|
+
value: true
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
//# sourceMappingURL=system-prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-model/prompt/planning/system-prompt.js","sources":["webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../../../../../src/ai-model/prompt/planning/system-prompt.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import type { DeviceAction } from '@/types';\nimport { getPreferredLanguage } from '@aiscene/shared/env';\nimport type { StandardPlanningProtocol } from '../../model-adapter/planning-protocol';\nimport type { LocateResultPromptSpec } from '../../shared/model-locate-result';\nimport { planningModelFamilyRequiredForLocateMessage } from '../../shared/model-locate-result/errors';\nimport { locateGroundingRules } from '../locate';\nimport {\n buildActionOutputExample,\n createSampleTapAction,\n} from './action-output-example';\nimport { buildPlanningActionSpaceDescription } from './action-space-description';\nimport { buildPlanningMultiTurnExample } from './multi-turn-example';\n\ntype BuildStandardPlanningSystemPromptInput = {\n actionSpace: DeviceAction<any>[];\n includeSubGoals?: boolean;\n includeThought?: boolean;\n includeLog?: boolean;\n planningProtocol: StandardPlanningProtocol;\n} & (\n | {\n includeLocateInPlanning: true;\n locatePromptSpec: LocateResultPromptSpec;\n }\n | {\n includeLocateInPlanning: false;\n locatePromptSpec?: never;\n }\n);\n\nexport async function buildStandardPlanningSystemPrompt(\n input: BuildStandardPlanningSystemPromptInput,\n) {\n const {\n actionSpace,\n includeLocateInPlanning,\n locatePromptSpec,\n includeSubGoals,\n includeThought = true,\n includeLog = true,\n planningProtocol,\n } = input;\n const actionOutputProtocol = planningProtocol.actionOutputProtocol;\n const preferredLanguage = getPreferredLanguage();\n\n if (includeLocateInPlanning && !locatePromptSpec) {\n throw new Error(planningModelFamilyRequiredForLocateMessage());\n }\n\n const actionSpaceDescription = buildPlanningActionSpaceDescription({\n actionSpace,\n locatePromptSpec,\n planningProtocol,\n });\n const hasRunAdbShell = actionSpace.some(\n (action) => action.name === 'RunAdbShell',\n );\n const actionOutputTagsText = actionOutputProtocol.actionOutputTagNames\n .map((tagName) => `<${tagName}>`)\n .join(', ');\n\n const shouldIncludeSubGoals = includeSubGoals ?? false;\n const renderSubGoalsContent = (content: string, fallbackContent = '') =>\n shouldIncludeSubGoals ? content : fallbackContent;\n const renderThoughtContent = (content: string, fallbackContent = '') =>\n includeThought ? content : fallbackContent;\n const renderLogContent = (content: string, fallbackContent = '') =>\n includeLog ? content : fallbackContent;\n\n // Step numbering adjusts based on whether sub-goals are included\n // When includeSubGoals=false, memory step is skipped\n const completionCheckStepNumber = shouldIncludeSubGoals ? 3 : 2;\n const actionStepNumber = completionCheckStepNumber + 1;\n\n return `\nTarget: You are an expert to manipulate the UI to accomplish the user's instruction. User will give you an instruction, some screenshots, background knowledge and previous logs indicating what have been done. Your task is to accomplish the instruction by thinking through the path to complete the task and give the next action to execute.\n\n## Step 1: ${renderSubGoalsContent(\n 'Observe and Plan (related tags: <planning>, <update-plan-content>, <mark-sub-goal-done>)',\n renderThoughtContent('Observe (related tags: <planning>)', 'Observe'),\n )}\n\nFirst, observe the current screenshot and previous logs${renderSubGoalsContent(\n \", then break down the user's instruction into multiple high-level sub-goals. Update the status of sub-goals based on what you see in the current screenshot.\",\n ' to understand the current state.',\n )}\n\n${renderSubGoalsContent(`### Observation Guidelines\n\n- Treat visible summaries, thumbnails, cropped content, and partially visible lists as potentially incomplete when the task depends on precise details.\n- If the current view does not provide enough information to decide safely, use available UI affordances such as opening details, expanding content, previewing, enlarging, zooming, or scrolling before acting.`)}\n\n${renderThoughtContent(`### <planning> tag (REQUIRED)\n\nREQUIRED: You MUST always output the <planning> tag. Never skip it.\n\nWrite the content of the <planning> tag in ${preferredLanguage}.\n\nInclude your planning details in the <planning> tag. It should answer: ${renderSubGoalsContent(\n \"What is the user's requirement? What is the current state based on the screenshot? Are all sub-goals completed? If not, what should be the next action?\",\n 'What is the current state based on the screenshot? What should be the next action?',\n)} Write it naturally without numbering or section headers.\n\nCRITICAL - Following Explicit Instructions: When the user gives you specific operation steps (not high-level goals), you MUST execute ONLY those exact steps - nothing more, nothing less. Do NOT add extra actions even if they seem logical. For example: \"fill out the form\" means only fill fields, do NOT submit; \"click the button\" means only click, do NOT wait for page load or verify results; \"type 'hello'\" means only type, do NOT press Enter.`)}\n\n${renderSubGoalsContent(`### <update-plan-content> tag\n\nUse this structure to give or update your plan:\n\n<update-plan-content>\n <sub-goal index=\"1\" status=\"finished|pending\">sub goal description</sub-goal>\n <sub-goal index=\"2\" status=\"finished|pending\">sub goal description</sub-goal>\n ...\n</update-plan-content>\n\n### <mark-sub-goal-done> tag\n\nUse this structure to mark a sub-goal as done:\n\n<mark-sub-goal-done>\n <sub-goal index=\"1\" status=\"finished\" />\n</mark-sub-goal-done>\n\nIMPORTANT: You MUST only mark a sub-goal as \"finished\" AFTER you have confirmed the task is actually completed by observing the result in the screenshot. Do NOT mark a sub-goal as done just because you expect the next action will complete it. Wait until you see visual confirmation in the screenshot that the sub-goal has been achieved.\n\n### Note\n\nDuring execution, you can call <update-plan-content> at any time to update the plan based on the latest screenshot and completed sub-goals.\n\n### Example\n\nIf the user wants to \"log in to a system using username and password, complete all to-do items, and submit a registration form\", you can break it down into the following sub-goals:\n\n<planning>...</planning>\n<update-plan-content>\n <sub-goal index=\"1\" status=\"pending\">Log in to the system</sub-goal>\n <sub-goal index=\"2\" status=\"pending\">Complete all to-do items</sub-goal>\n <sub-goal index=\"3\" status=\"pending\">Submit the registration form</sub-goal>\n</update-plan-content>\n\nAfter logging in and seeing the to-do items, you can mark the sub-goal as done:\n\n<mark-sub-goal-done>\n <sub-goal index=\"1\" status=\"finished\" />\n</mark-sub-goal-done>\n\nAt this point, the status of all sub-goals is:\n\n<update-plan-content>\n <sub-goal index=\"1\" status=\"finished\" />\n <sub-goal index=\"2\" status=\"pending\" />\n <sub-goal index=\"3\" status=\"pending\" />\n</update-plan-content>\n\nAfter some time, when the last sub-goal is also completed, you can mark it as done as well:\n\n<mark-sub-goal-done>\n <sub-goal index=\"3\" status=\"finished\" />\n</mark-sub-goal-done>`)}\n\n${renderSubGoalsContent(`## Step 2: Memory Data from Current Screenshot (related tags: <memory>)\n\nUse <memory> to record clear, task-relevant information from the current screenshot that may be needed in later steps. The current screenshot will not be available later, so memory should preserve enough detail for future reasoning, verification, or action.\n\n- Record information completely and exactly as shown. Do not summarize, translate, normalize, or merge values that may matter later.\n- When recording an item, include the item itself, its exact task-relevant details, and the visible cue or UI context that identifies where it came from when relevant.\n- Keep similar or repeated items as separate memory entries unless their task-relevant details are confirmed to be the same.\n- After navigation, scrolling, editing, deletion, saving, or other screen changes, treat remembered positions, order, indexes, and UI bindings as references only. Re-check the current screen before acting on them.\n\nExamples:\n- If you need to find an item and later assert its details, record the item name and the exact details needed for the assertion, such as status, price, date, owner, description, or other visible fields.\n- If you need to compare multiple similar results, record each candidate separately with its exact distinguishing details and visible context.\n- If you need to copy information from one place to another, record the exact source value and the target field or UI cue it should be mapped to.\n\nDon't use this tag if no information needs to be preserved.`)}\n\n## Step ${completionCheckStepNumber}: ${renderSubGoalsContent(\n 'Check if Goal is Accomplished',\n 'Check if the Instruction is Fulfilled',\n )} (related tags: <complete>)\n\nDetermine if the entire task is completed${renderSubGoalsContent(' based on the current screenshot and the status of all sub-goals')}.\n\n### CRITICAL: The User's Instruction is the Supreme Authority\n\nThe user's instruction defines the EXACT scope of what you must accomplish. You MUST follow it precisely - nothing more, nothing less. Violating this rule may cause severe consequences such as data loss, unintended operations, or system failures.\n\n**Explicit instructions vs. High-level goals:**\n- If the user gives you **explicit operation steps** (e.g., \"click X\", \"type Y\", \"fill out the form\"), treat them as exact commands. Execute ONLY those steps, nothing more.\n- If the user gives you a **high-level goal** (e.g., \"log in to the system\", \"complete the purchase\"), you may determine the necessary steps to achieve it.\n\n**What \"${renderSubGoalsContent('goal accomplished', 'instruction fulfilled')}\" means:**\n- The ${renderSubGoalsContent('goal is accomplished', 'instruction is fulfilled')} when you have done EXACTLY what the user asked - no extra steps, no assumptions.\n- Do NOT perform any action beyond the explicit instruction, even if it seems logical or helpful.\n\n**Examples - Explicit instructions (execute exactly, no extra steps):**\n- \"fill out the form\" → ${renderSubGoalsContent('Goal accomplished', 'Instruction fulfilled')} when all fields are filled. Do NOT submit the form.\n- \"click the login button\" → ${renderSubGoalsContent('Goal accomplished', 'Instruction fulfilled')} once clicked. Do NOT wait for page load or verify login success.\n- \"type 'hello' in the search box\" → ${renderSubGoalsContent('Goal accomplished', 'Instruction fulfilled')} when 'hello' is typed. Do NOT press Enter or trigger search.\n- \"select the first item\" → ${renderSubGoalsContent('Goal accomplished', 'Instruction fulfilled')} when selected. Do NOT proceed to checkout.\n\n**Change completion:**\n- If the requested outcome is a durable change, such as create, edit, update, delete, save, send, submit, apply, or publish, do not stop at an unsaved draft, open editor, temporary input, transient selection, or staged value. Continue through the app/page's normal completion control such as Save, Done, Confirm, OK, Submit, Apply, Send, or Publish before completing, so the result remains after leaving the screen.\n- If the user only asks for an intermediate UI state, such as typing text, selecting an option, filling fields, or opening a screen without saving/submitting/applying, stop once that exact state is reached.\n\n**Special case - Scrollable option lists and dropdowns:**\n- When choosing an item from a scrollable select, dropdown, listbox, menu, or similar option list, first open the control if it is closed. Once the list is open, interact with the list itself, not the page.\n- If the target option is visible in the open list, Tap that exact option immediately.\n- If the list is open but the target option is not visible, try to find it by scrolling the open list/dropdown before giving up or interacting with other elements.\n- For an open dropdown/list, prefer small incremental Scroll actions with an explicit distance (typically 50-120 pixels) and a locate target describing the open list/dropdown. Do NOT omit distance while searching within a list, because the default scroll distance can skip over relevant options and cause oscillation.\n- While searching within an open dropdown/list, use short scrolls so intermediate options are not skipped.\n- After selecting the target, if the trigger text or result text shows the requested option, treat the current selection step as fulfilled and continue evaluating the remaining user instruction.\n\n**Special case - Text hidden by a narrow input field:**\n- CRITICAL PRIORITY OVERRIDE - Input verification after an input action:\n- This rule overrides the general requirement to verify the exact target text from the screenshot.\n- If the previous step already executed an input action, and the current input field is not empty, you MUST directly treat that input as successful.\n- In this situation, do NOT use the visible text in the screenshot to decide that the input is incomplete, incorrect, missing characters, out of order, or needs correction.\n- Do NOT perform ClearInput, another Input, KeyboardPress, or any other action intended to \"fix the input content\" just because the visible text looks different from the target text, has abnormal character order, missing characters, abnormal spacing, suspicious visual recognition results, or appears to have selected/highlighted text.\n- The general rule \"do EXACTLY what the user asked\" still applies to the intended input value you execute, but it MUST NOT be enforced by re-validating the visible text in the screenshot after the input action.\n- Differences in visible text must be assumed to be caused by clipping, horizontal scrolling, narrow input fields, text selection, caret position, or visual recognition errors rather than input failure.\n- Retry input only when the input field is clearly still empty, or when the page shows an explicit error message.\n\n**Special case - Assertion instructions:**\n- If the user's instruction includes an assertion (e.g., \"verify that...\", \"check that...\", \"assert...\"), and you observe from the screenshot that the assertion condition is NOT satisfied and cannot be satisfied, mark ${renderSubGoalsContent('the goal', 'it')} as failed (success=\"false\").\n- If the page is still loading (e.g., you see a loading spinner, skeleton screen, or progress bar), do NOT assert yet. Wait for the page to finish loading before evaluating the assertion.\n\n### Completion Criteria for Process-required Instructions\n\nIf the user's instruction includes explicit operation steps, ordering requirements, or action requirements, it is a process-required instruction.\n\nFor process-required instructions, do NOT treat the task as complete only because the current screenshot already shows the final expected state. Do NOT infer that earlier steps were executed from the final UI state.\n\nYou may output <complete success=\"true\"> only when the current execution history, previous logs, or the screenshot after the most recent action proves that every explicit step required by the user has been completed, and the final check condition is also satisfied.\n\nIf any explicit step lacks completion evidence in the current execution history, continue with the next missing step instead of outputting <complete>, even if the current screenshot appears to satisfy the final condition.\n\n${renderSubGoalsContent(\n '',\n `**Page navigation restriction:**\n- Unless the user's instruction explicitly asks you to click a link, jump to another page, or navigate to a URL, you MUST complete the task on the current page only.\n- Do NOT navigate away from the current page on your own initiative (e.g., do not click links that lead to other pages, do not use browser back/forward, do not open new URLs).\n- If the task cannot be accomplished on the current page and the user has not instructed you to navigate, report it as a failure (success=\"false\") instead of attempting to navigate to other pages.`,\n)}\n\n### Output Rules\n\n- If the task is NOT complete, skip this section and continue to Step ${actionStepNumber}.\n- Use the <complete success=\"true|false\">message</complete> tag to output the result if the goal is accomplished or failed.\n - the 'success' attribute is required. ${renderSubGoalsContent('It means whether the expected goal is accomplished based on what you observe in the current screenshot and the current execution history. ')}No matter what errors occurred during execution, set success=\"true\" only when the current execution history shows that all steps required by the user have been completed and the final state satisfies the requirement. If the user asks for explicit operation steps or an ordered workflow, do not treat those steps as completed only because the current screenshot already shows the final expected state. If the ${renderSubGoalsContent('expected goal is not accomplished and cannot be accomplished', 'instruction is not fulfilled and cannot be fulfilled')}, set success=\"false\".\n - the 'message' is the information that will be provided to the user. If the user asks for a specific format, strictly follow that.\n- If you output <complete>, do NOT output ${actionOutputTagsText}. The task ends here.\n\n## Step ${actionStepNumber}: Determine Next Action (related tags: ${renderLogContent('<log>, ')}${actionOutputTagsText}, <error>)\n\nONLY if the task is not complete: Think what the next action is according to the current screenshot${renderSubGoalsContent(' and the plan')}.\n\n- Don't give extra actions or plans beyond the instruction or the plan. For example, don't try to submit the form if the instruction is only to fill something.\n- Consider the current screenshot and give the action that is most likely to accomplish the instruction. For example, if the next step is to click a button but it's not visible in the screenshot, you should try to find it first instead of give a click action.\n- Make sure the previous actions are completed successfully. Otherwise, retry or do something else to recover.\n- Give just the next ONE action you should do (if any)\n- If there are some error messages reported by the previous actions, don't give up, try parse a new action to recover. If the error persists for more than 3 times, you should think this is an error and set the \"error\" field to the error message.\n\n### Action Guidelines\n\n${\n hasRunAdbShell\n ? \"- If the user's task can be completed with the RunAdbShell action, prefer using the RunAdbShell action.\"\n : ''\n}\n- For touch continuous controls that set a value along a track, such as a slider, prefer Swipe from the current handle or filled position to the requested track endpoint instead of tapping the endpoint.\n- When editing existing text in a UI field, preserve all existing text by moving the cursor and typing/deleting the minimal necessary characters.\n- For insert/prepend/append edits, use CursorMove when the caret must be adjusted precisely, then use Input with mode \"typeOnly\" for inserted characters and KeyboardPress for newlines or deletion. If the caret lands in the wrong position, recover with CursorMove, KeyboardPress, or undo and retry cursor placement; do not switch to replace as a fallback for cursor placement failures.\n\n${includeLocateInPlanning ? locateGroundingRules() : ''}\n\n### ${planningProtocol.actionSpaceProtocol.title}\n\n${actionSpaceDescription}\n\n${renderLogContent(`### Log to give user feedback (preamble message)\n\nThe <log> tag is a brief preamble message to the user explaining what you're about to do. It should follow these principles and examples:\n\n- **Use ${preferredLanguage}**\n- **Keep it concise**: be no more than 1-2 sentences, focused on immediate, tangible next steps. (8–12 words or Chinese characters for quick updates).\n- **Build on prior context**: if this is not the first action to be done, use the preamble message to connect the dots with what's been done so far and create a sense of momentum and clarity for the user to understand your next actions.\n- **Keep your tone light, friendly and curious**: add small touches of personality in preambles feel collaborative and engaging.\n\n**Examples:**\n- <log>Click the login button</log>\n- <log>Scroll to find the 'Yes' button in popup</log>\n- <log>Previous actions failed to find the 'Yes' button, i will try again</log>\n- <log>Go back to find the login button</log>`)}\n\n### If there is some action to do ...\n\n${actionOutputProtocol.actionOutputRules}\n\nFor example:\n${buildActionOutputExample(\n createSampleTapAction('Add to cart button for Sauce Labs Backpack'),\n {\n locatePromptSpec,\n locateResultExampleIndex: 1,\n buildActionOutput: actionOutputProtocol.buildActionOutput,\n },\n)}\n\n### If you think there is an error ...\n\n- Use the <error> tag to output the error message.\n\nFor example:\n<error>Unable to find the required element on the page</error>\n\n### If there is no action to do ...\n\n- Don't output ${actionOutputTagsText} if there is no action to do.\n\n## Return Format\n\nReturn in XML format following this decision flow:\n\n${planningProtocol.responsePrefix ?? ''}\n\n${renderThoughtContent(`**Always include (REQUIRED):**\n<!-- Step 1: Observe and Plan -->\n<planning>Your planning details here. NEVER skip this tag.</planning>`)}\n${renderSubGoalsContent(`<!-- required when no update-plan-content is provided in the previous response -->\n<update-plan-content>...</update-plan-content>\n\n<!-- required when any sub-goal is completed -->\n<mark-sub-goal-done>\n <sub-goal index=\"1\" status=\"finished\" />\n</mark-sub-goal-done>\n\n<!-- Step 2: Memory data from current screenshot if needed -->\n<memory>...</memory>`)}\n\n**Then choose ONE of the following paths:**\n\n**Path A: If the ${renderSubGoalsContent('goal is accomplished', 'instruction is fulfilled')} or failed (Step ${completionCheckStepNumber})**\n<complete success=\"true|false\">...</complete>\n\n**Path B: If the ${renderSubGoalsContent('goal is NOT complete', 'instruction is NOT fulfilled')} yet (Step ${actionStepNumber})**\n<!-- Determine next action -->\n${renderLogContent('<log>...</log>')}\n${actionOutputProtocol.actionOutputPlaceholder}\n\n<!-- OR if there's an error -->\n<error>...</error>\n\n${buildPlanningMultiTurnExample({\n includeSubGoals: shouldIncludeSubGoals,\n includeThought,\n includeLog,\n locatePromptSpec,\n actionOutputProtocol,\n prefix: planningProtocol.responsePrefix,\n})}`;\n}\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","buildStandardPlanningSystemPrompt","input","actionSpace","includeLocateInPlanning","locatePromptSpec","includeSubGoals","includeThought","includeLog","planningProtocol","actionOutputProtocol","preferredLanguage","getPreferredLanguage","Error","planningModelFamilyRequiredForLocateMessage","actionSpaceDescription","buildPlanningActionSpaceDescription","hasRunAdbShell","action","actionOutputTagsText","tagName","shouldIncludeSubGoals","renderSubGoalsContent","content","fallbackContent","renderThoughtContent","renderLogContent","completionCheckStepNumber","actionStepNumber","locateGroundingRules","buildActionOutputExample","createSampleTapAction","buildPlanningMultiTurnExample"],"mappings":";;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,eAAlB,OAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;;;;;;ACwBO,eAAeI,kCACpBC,KAA6C;IAE7C,MAAM,EACJC,WAAW,EACXC,uBAAuB,EACvBC,gBAAgB,EAChBC,eAAe,EACfC,iBAAiB,IAAI,EACrBC,aAAa,IAAI,EACjBC,gBAAgB,EACjB,GAAGP;IACJ,MAAMQ,uBAAuBD,iBAAiB,oBAAoB;IAClE,MAAME,oBAAoBC,AAAAA,IAAAA,oBAAAA,oBAAAA,AAAAA;IAE1B,IAAIR,2BAA2B,CAACC,kBAC9B,MAAM,IAAIQ,MAAMC,AAAAA,IAAAA,0BAAAA,2CAAAA,AAAAA;IAGlB,MAAMC,yBAAyBC,AAAAA,IAAAA,qDAAAA,mCAAAA,AAAAA,EAAoC;QACjEb;QACAE;QACAI;IACF;IACA,MAAMQ,iBAAiBd,YAAY,IAAI,CACrC,CAACe,SAAWA,AAAgB,kBAAhBA,OAAO,IAAI;IAEzB,MAAMC,uBAAuBT,qBAAqB,oBAAoB,CACnE,GAAG,CAAC,CAACU,UAAY,CAAC,CAAC,EAAEA,QAAQ,CAAC,CAAC,EAC/B,IAAI,CAAC;IAER,MAAMC,wBAAwBf,mBAAmB;IACjD,MAAMgB,wBAAwB,CAACC,SAAiBC,kBAAkB,EAAE,GAClEH,wBAAwBE,UAAUC;IACpC,MAAMC,uBAAuB,CAACF,SAAiBC,kBAAkB,EAAE,GACjEjB,iBAAiBgB,UAAUC;IAC7B,MAAME,mBAAmB,CAACH,SAAiBC,kBAAkB,EAAE,GAC7DhB,aAAae,UAAUC;IAIzB,MAAMG,4BAA4BN,wBAAwB,IAAI;IAC9D,MAAMO,mBAAmBD,4BAA4B;IAErD,OAAO,CAAC;;;WAGC,EAAEL,sBACT,4FACAG,qBAAqB,sCAAsC,YAC3D;;uDAEmD,EAAEH,sBACrD,gKACA,qCACA;;AAEJ,EAAEA,sBAAsB,CAAC;;;gNAGuL,CAAC,EAAE;;AAEnN,EAAEG,qBAAqB,CAAC;;;;2CAImB,EAAEd,kBAAkB;;uEAEQ,EAAEW,sBACvE,2JACA,sFACA;;4bAE0b,CAAC,EAAE;;AAE/b,EAAEA,sBAAsB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAqDJ,CAAC,EAAE;;AAExB,EAAEA,sBAAsB,CAAC;;;;;;;;;;;;;;2DAckC,CAAC,EAAE;;QAEtD,EAAEK,0BAA0B,EAAE,EAAEL,sBACpC,iCACA,yCACA;;yCAEqC,EAAEA,sBAAsB,oEAAoE;;;;;;;;;;QAU7H,EAAEA,sBAAsB,qBAAqB,yBAAyB;MACxE,EAAEA,sBAAsB,wBAAwB,4BAA4B;;;;wBAI1D,EAAEA,sBAAsB,qBAAqB,yBAAyB;6BACjE,EAAEA,sBAAsB,qBAAqB,yBAAyB;qCAC9D,EAAEA,sBAAsB,qBAAqB,yBAAyB;4BAC/E,EAAEA,sBAAsB,qBAAqB,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;0NAyBwH,EAAEA,sBAAsB,YAAY,MAAM;;;;;;;;;;;;;AAapQ,EAAEA,sBACA,IACA,CAAC;;;oMAGiM,CAAC,EACnM;;;;sEAIoE,EAAEM,iBAAiB;;yCAEhD,EAAEN,sBAAsB,8IAA8I,wZAAwZ,EAAEA,sBAAsB,gEAAgE,wDAAwD;;0CAE7sB,EAAEH,qBAAqB;;QAEzD,EAAES,iBAAiB,uCAAuC,EAAEF,iBAAiB,aAAaP,qBAAqB;;mGAEpB,EAAEG,sBAAsB,iBAAiB;;;;;;;;;;AAU5I,EACEL,iBACI,4GACA,GACL;;;;;AAKD,EAAEb,0BAA0ByB,AAAAA,IAAAA,yBAAAA,oBAAAA,AAAAA,MAAyB,GAAG;;IAEpD,EAAEpB,iBAAiB,mBAAmB,CAAC,KAAK,CAAC;;AAEjD,EAAEM,uBAAuB;;AAEzB,EAAEW,iBAAiB,CAAC;;;;QAIZ,EAAEf,kBAAkB;;;;;;;;;6CASiB,CAAC,EAAE;;;;AAIhD,EAAED,qBAAqB,iBAAiB,CAAC;;;AAGzC,EAAEoB,AAAAA,IAAAA,kDAAAA,wBAAAA,AAAAA,EACAC,AAAAA,IAAAA,kDAAAA,qBAAAA,AAAAA,EAAsB,+CACtB;QACE1B;QACA,0BAA0B;QAC1B,mBAAmBK,qBAAqB,iBAAiB;IAC3D,GACA;;;;;;;;;;;eAWa,EAAES,qBAAqB;;;;;;AAMtC,EAAEV,iBAAiB,cAAc,IAAI,GAAG;;AAExC,EAAEgB,qBAAqB,CAAC;;qEAE6C,CAAC,EAAE;AACxE,EAAEH,sBAAsB,CAAC;;;;;;;;;oBASL,CAAC,EAAE;;;;iBAIN,EAAEA,sBAAsB,wBAAwB,4BAA4B,iBAAiB,EAAEK,0BAA0B;;;iBAGzH,EAAEL,sBAAsB,wBAAwB,gCAAgC,WAAW,EAAEM,iBAAiB;;AAE/H,EAAEF,iBAAiB,kBAAkB;AACrC,EAAEhB,qBAAqB,uBAAuB,CAAC;;;;;AAK/C,EAAEsB,AAAAA,IAAAA,+CAAAA,6BAAAA,AAAAA,EAA8B;QAC9B,iBAAiBX;QACjBd;QACAC;QACAH;QACAK;QACA,QAAQD,iBAAiB,cAAc;IACzC,IAAI;AACJ"}
|
|
@@ -430,6 +430,7 @@ class CodexAppServerConnection {
|
|
|
430
430
|
time_cost: Date.now() - startTime,
|
|
431
431
|
model_name: modelConfig.modelName,
|
|
432
432
|
model_description: modelConfig.modelDescription,
|
|
433
|
+
response_model_name: void 0,
|
|
433
434
|
slot: modelConfig.slot,
|
|
434
435
|
intent: void 0,
|
|
435
436
|
request_id: turnId
|