@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.
Files changed (686) hide show
  1. package/dist/es/agent/agent.mjs +24 -11
  2. package/dist/es/agent/agent.mjs.map +1 -1
  3. package/dist/es/agent/cache-config.mjs +19 -0
  4. package/dist/es/agent/cache-config.mjs.map +1 -0
  5. package/dist/es/agent/file-chooser.mjs +82 -0
  6. package/dist/es/agent/file-chooser.mjs.map +1 -0
  7. package/dist/es/agent/insight.mjs +101 -0
  8. package/dist/es/agent/insight.mjs.map +1 -0
  9. package/dist/es/agent/metrics.mjs +81 -0
  10. package/dist/es/agent/metrics.mjs.map +1 -0
  11. package/dist/es/agent/progress/ai-act-progress.mjs +199 -0
  12. package/dist/es/agent/progress/ai-act-progress.mjs.map +1 -0
  13. package/dist/es/agent/progress/index.mjs +2 -0
  14. package/dist/es/agent/progress/progress-bus.mjs +52 -0
  15. package/dist/es/agent/progress/progress-bus.mjs.map +1 -0
  16. package/dist/es/agent/prompt-context.mjs +25 -0
  17. package/dist/es/agent/prompt-context.mjs.map +1 -0
  18. package/dist/es/agent/record-to-report.mjs +14 -0
  19. package/dist/es/agent/record-to-report.mjs.map +1 -0
  20. package/dist/es/agent/run-gherkin-scenario.mjs +114 -0
  21. package/dist/es/agent/run-gherkin-scenario.mjs.map +1 -0
  22. package/dist/es/agent/run-markdown.mjs +62 -0
  23. package/dist/es/agent/run-markdown.mjs.map +1 -0
  24. package/dist/es/agent/screenshot-preparation.mjs +37 -0
  25. package/dist/es/agent/screenshot-preparation.mjs.map +1 -0
  26. package/dist/es/agent/ui-observer.mjs +385 -0
  27. package/dist/es/agent/ui-observer.mjs.map +1 -0
  28. package/dist/es/agent/utils.mjs +42 -4
  29. package/dist/es/agent/utils.mjs.map +1 -1
  30. package/dist/es/ai-model/connectivity/fixture.mjs +8 -0
  31. package/dist/es/ai-model/connectivity/fixture.mjs.map +1 -0
  32. package/dist/es/ai-model/connectivity/index.mjs +2 -0
  33. package/dist/es/ai-model/connectivity/run-connectivity-test.mjs +160 -0
  34. package/dist/es/ai-model/connectivity/run-connectivity-test.mjs.map +1 -0
  35. package/dist/es/ai-model/conversation-history.mjs.map +1 -1
  36. package/dist/es/ai-model/index.mjs +2 -1
  37. package/dist/es/ai-model/inspect.mjs +1 -1
  38. package/dist/es/ai-model/inspect.mjs.map +1 -1
  39. package/dist/es/ai-model/model-adapter/chat-completion.mjs +69 -0
  40. package/dist/es/ai-model/model-adapter/chat-completion.mjs.map +1 -0
  41. package/dist/es/ai-model/model-adapter/custom-planning-action.mjs +6 -0
  42. package/dist/es/ai-model/model-adapter/custom-planning-action.mjs.map +1 -0
  43. package/dist/es/ai-model/model-adapter/custom-planning-types.mjs +0 -0
  44. package/dist/es/ai-model/model-adapter/default-insight-protocol.mjs +28 -0
  45. package/dist/es/ai-model/model-adapter/default-insight-protocol.mjs.map +1 -0
  46. package/dist/es/ai-model/model-adapter/default-locate-protocol.mjs +145 -0
  47. package/dist/es/ai-model/model-adapter/default-locate-protocol.mjs.map +1 -0
  48. package/dist/es/ai-model/model-adapter/default-planning-protocol.mjs +124 -0
  49. package/dist/es/ai-model/model-adapter/default-planning-protocol.mjs.map +1 -0
  50. package/dist/es/ai-model/model-adapter/image-preprocess.mjs +27 -0
  51. package/dist/es/ai-model/model-adapter/image-preprocess.mjs.map +1 -0
  52. package/dist/es/ai-model/model-adapter/index.mjs +2 -0
  53. package/dist/es/ai-model/model-adapter/insight-protocol.mjs +0 -0
  54. package/dist/es/ai-model/model-adapter/insight.mjs +13 -0
  55. package/dist/es/ai-model/model-adapter/insight.mjs.map +1 -0
  56. package/dist/es/ai-model/model-adapter/locate-protocol.mjs +0 -0
  57. package/dist/es/ai-model/model-adapter/locate.mjs +53 -0
  58. package/dist/es/ai-model/model-adapter/locate.mjs.map +1 -0
  59. package/dist/es/ai-model/model-adapter/planning-protocol.mjs +0 -0
  60. package/dist/es/ai-model/model-adapter/planning.mjs +49 -0
  61. package/dist/es/ai-model/model-adapter/planning.mjs.map +1 -0
  62. package/dist/es/ai-model/model-adapter/resolve.mjs +54 -0
  63. package/dist/es/ai-model/model-adapter/resolve.mjs.map +1 -0
  64. package/dist/es/ai-model/model-adapter/types.mjs +0 -0
  65. package/dist/es/ai-model/models/auto-glm/actions.mjs +205 -0
  66. package/dist/es/ai-model/models/auto-glm/actions.mjs.map +1 -0
  67. package/dist/es/ai-model/models/auto-glm/adapter.mjs +45 -0
  68. package/dist/es/ai-model/models/auto-glm/adapter.mjs.map +1 -0
  69. package/dist/es/ai-model/models/auto-glm/locate.mjs +11 -0
  70. package/dist/es/ai-model/models/auto-glm/locate.mjs.map +1 -0
  71. package/dist/es/ai-model/models/auto-glm/parser.mjs +217 -0
  72. package/dist/es/ai-model/models/auto-glm/parser.mjs.map +1 -0
  73. package/dist/es/ai-model/models/auto-glm/planning.mjs +33 -0
  74. package/dist/es/ai-model/models/auto-glm/planning.mjs.map +1 -0
  75. package/dist/es/ai-model/models/auto-glm/prompt.mjs +214 -0
  76. package/dist/es/ai-model/models/auto-glm/prompt.mjs.map +1 -0
  77. package/dist/es/ai-model/models/deepseek/adapter.mjs +79 -0
  78. package/dist/es/ai-model/models/deepseek/adapter.mjs.map +1 -0
  79. package/dist/es/ai-model/models/deepseek/locate-protocol.mjs +89 -0
  80. package/dist/es/ai-model/models/deepseek/locate-protocol.mjs.map +1 -0
  81. package/dist/es/ai-model/models/default.mjs +13 -0
  82. package/dist/es/ai-model/models/default.mjs.map +1 -0
  83. package/dist/es/ai-model/models/doubao.mjs +95 -0
  84. package/dist/es/ai-model/models/doubao.mjs.map +1 -0
  85. package/dist/es/ai-model/models/gemini.mjs +100 -0
  86. package/dist/es/ai-model/models/gemini.mjs.map +1 -0
  87. package/dist/es/ai-model/models/glm.mjs +46 -0
  88. package/dist/es/ai-model/models/glm.mjs.map +1 -0
  89. package/dist/es/ai-model/models/gpt.mjs +43 -0
  90. package/dist/es/ai-model/models/gpt.mjs.map +1 -0
  91. package/dist/es/ai-model/models/index.mjs +2 -0
  92. package/dist/es/ai-model/models/kimi.mjs +102 -0
  93. package/dist/es/ai-model/models/kimi.mjs.map +1 -0
  94. package/dist/es/ai-model/models/mimo.mjs +36 -0
  95. package/dist/es/ai-model/models/mimo.mjs.map +1 -0
  96. package/dist/es/ai-model/models/qwen.mjs +139 -0
  97. package/dist/es/ai-model/models/qwen.mjs.map +1 -0
  98. package/dist/es/ai-model/models/registry.mjs +51 -0
  99. package/dist/es/ai-model/models/registry.mjs.map +1 -0
  100. package/dist/es/ai-model/models/ui-tars/actions.mjs +147 -0
  101. package/dist/es/ai-model/models/ui-tars/actions.mjs.map +1 -0
  102. package/dist/es/ai-model/models/ui-tars/adapter.mjs +102 -0
  103. package/dist/es/ai-model/models/ui-tars/adapter.mjs.map +1 -0
  104. package/dist/es/ai-model/models/ui-tars/parser.mjs +40 -0
  105. package/dist/es/ai-model/models/ui-tars/parser.mjs.map +1 -0
  106. package/dist/es/ai-model/models/ui-tars/planning.mjs +25 -0
  107. package/dist/es/ai-model/models/ui-tars/planning.mjs.map +1 -0
  108. package/dist/es/ai-model/models/ui-tars/prompt.mjs +36 -0
  109. package/dist/es/ai-model/models/ui-tars/prompt.mjs.map +1 -0
  110. package/dist/es/ai-model/models/utils/intent.mjs +6 -0
  111. package/dist/es/ai-model/models/utils/intent.mjs.map +1 -0
  112. package/dist/es/ai-model/prompt/insight/index.mjs +3 -0
  113. package/dist/es/ai-model/prompt/insight/system-prompt.mjs +104 -0
  114. package/dist/es/ai-model/prompt/insight/system-prompt.mjs.map +1 -0
  115. package/dist/es/ai-model/prompt/insight/user-prompt.mjs +23 -0
  116. package/dist/es/ai-model/prompt/insight/user-prompt.mjs.map +1 -0
  117. package/dist/es/ai-model/prompt/locate/element-system-prompt.mjs +12 -0
  118. package/dist/es/ai-model/prompt/locate/element-system-prompt.mjs.map +1 -0
  119. package/dist/es/ai-model/prompt/locate/grounding-rules.mjs +13 -0
  120. package/dist/es/ai-model/prompt/locate/grounding-rules.mjs.map +1 -0
  121. package/dist/es/ai-model/prompt/locate/index.mjs +4 -0
  122. package/dist/es/ai-model/prompt/locate/search-area-system-prompt.mjs +9 -0
  123. package/dist/es/ai-model/prompt/locate/search-area-system-prompt.mjs.map +1 -0
  124. package/dist/es/ai-model/prompt/planning/action-output-example.mjs +52 -0
  125. package/dist/es/ai-model/prompt/planning/action-output-example.mjs.map +1 -0
  126. package/dist/es/ai-model/prompt/planning/action-space-description.mjs +28 -0
  127. package/dist/es/ai-model/prompt/planning/action-space-description.mjs.map +1 -0
  128. package/dist/es/ai-model/prompt/planning/index.mjs +6 -0
  129. package/dist/es/ai-model/prompt/planning/multi-turn-example.mjs +221 -0
  130. package/dist/es/ai-model/prompt/planning/multi-turn-example.mjs.map +1 -0
  131. package/dist/es/ai-model/prompt/planning/planning-response-example.mjs +25 -0
  132. package/dist/es/ai-model/prompt/planning/planning-response-example.mjs.map +1 -0
  133. package/dist/es/ai-model/prompt/planning/sub-goals-text.mjs +17 -0
  134. package/dist/es/ai-model/prompt/planning/sub-goals-text.mjs.map +1 -0
  135. package/dist/es/ai-model/prompt/planning/system-prompt.mjs +293 -0
  136. package/dist/es/ai-model/prompt/planning/system-prompt.mjs.map +1 -0
  137. package/dist/es/ai-model/service-caller/codex-app-server.mjs +1 -0
  138. package/dist/es/ai-model/service-caller/codex-app-server.mjs.map +1 -1
  139. package/dist/es/ai-model/service-caller/index.mjs +35 -16
  140. package/dist/es/ai-model/service-caller/index.mjs.map +1 -1
  141. package/dist/es/ai-model/service-caller/model-call-recorder.mjs +74 -0
  142. package/dist/es/ai-model/service-caller/model-call-recorder.mjs.map +1 -0
  143. package/dist/es/ai-model/service-caller/openai-error.mjs +147 -0
  144. package/dist/es/ai-model/service-caller/openai-error.mjs.map +1 -0
  145. package/dist/es/ai-model/service-caller/proxy-deps.node.mjs +9 -0
  146. package/dist/es/ai-model/service-caller/proxy-deps.node.mjs.map +1 -0
  147. package/dist/es/ai-model/service-caller/proxy-deps.stub.mjs +12 -0
  148. package/dist/es/ai-model/service-caller/proxy-deps.stub.mjs.map +1 -0
  149. package/dist/es/ai-model/service-caller/semantic-retry.mjs +33 -0
  150. package/dist/es/ai-model/service-caller/semantic-retry.mjs.map +1 -0
  151. package/dist/es/ai-model/service-caller/types.mjs +0 -0
  152. package/dist/es/ai-model/shared/action-schema.mjs +15 -0
  153. package/dist/es/ai-model/shared/action-schema.mjs.map +1 -0
  154. package/dist/es/ai-model/shared/json.mjs +63 -0
  155. package/dist/es/ai-model/shared/json.mjs.map +1 -0
  156. package/dist/es/ai-model/shared/model-locate-result/bbox.mjs +60 -0
  157. package/dist/es/ai-model/shared/model-locate-result/bbox.mjs.map +1 -0
  158. package/dist/es/ai-model/shared/model-locate-result/coordinate-distance.mjs +10 -0
  159. package/dist/es/ai-model/shared/model-locate-result/coordinate-distance.mjs.map +1 -0
  160. package/dist/es/ai-model/shared/model-locate-result/errors.mjs +9 -0
  161. package/dist/es/ai-model/shared/model-locate-result/errors.mjs.map +1 -0
  162. package/dist/es/ai-model/shared/model-locate-result/factory.mjs +39 -0
  163. package/dist/es/ai-model/shared/model-locate-result/factory.mjs.map +1 -0
  164. package/dist/es/ai-model/shared/model-locate-result/index.mjs +6 -0
  165. package/dist/es/ai-model/shared/model-locate-result/parse.mjs +45 -0
  166. package/dist/es/ai-model/shared/model-locate-result/parse.mjs.map +1 -0
  167. package/dist/es/ai-model/shared/model-locate-result/pixel-bbox-mapper.mjs +67 -0
  168. package/dist/es/ai-model/shared/model-locate-result/pixel-bbox-mapper.mjs.map +1 -0
  169. package/dist/es/ai-model/shared/model-locate-result/prompt-spec.mjs +110 -0
  170. package/dist/es/ai-model/shared/model-locate-result/prompt-spec.mjs.map +1 -0
  171. package/dist/es/ai-model/shared/model-locate-result/types.mjs +9 -0
  172. package/dist/es/ai-model/shared/model-locate-result/types.mjs.map +1 -0
  173. package/dist/es/ai-model/shared/multimodal-prompt.mjs +55 -0
  174. package/dist/es/ai-model/shared/multimodal-prompt.mjs.map +1 -0
  175. package/dist/es/ai-model/shared/xml.mjs +42 -0
  176. package/dist/es/ai-model/shared/xml.mjs.map +1 -0
  177. package/dist/es/ai-model/workflows/grounding/index.mjs +4 -0
  178. package/dist/es/ai-model/workflows/grounding/locate-result-rect.mjs +23 -0
  179. package/dist/es/ai-model/workflows/grounding/locate-result-rect.mjs.map +1 -0
  180. package/dist/es/ai-model/workflows/grounding/locate.mjs +168 -0
  181. package/dist/es/ai-model/workflows/grounding/locate.mjs.map +1 -0
  182. package/dist/es/ai-model/workflows/grounding/planning-action-locate.mjs +97 -0
  183. package/dist/es/ai-model/workflows/grounding/planning-action-locate.mjs.map +1 -0
  184. package/dist/es/ai-model/workflows/grounding/search-area-mapping.mjs +18 -0
  185. package/dist/es/ai-model/workflows/grounding/search-area-mapping.mjs.map +1 -0
  186. package/dist/es/ai-model/workflows/grounding/search-area.mjs +55 -0
  187. package/dist/es/ai-model/workflows/grounding/search-area.mjs.map +1 -0
  188. package/dist/es/ai-model/workflows/grounding/section-locate.mjs +146 -0
  189. package/dist/es/ai-model/workflows/grounding/section-locate.mjs.map +1 -0
  190. package/dist/es/ai-model/workflows/grounding/types.mjs +0 -0
  191. package/dist/es/ai-model/workflows/grounding/utils.mjs +50 -0
  192. package/dist/es/ai-model/workflows/grounding/utils.mjs.map +1 -0
  193. package/dist/es/ai-model/workflows/insight/extraction.mjs +101 -0
  194. package/dist/es/ai-model/workflows/insight/extraction.mjs.map +1 -0
  195. package/dist/es/ai-model/workflows/insight/index.mjs +3 -0
  196. package/dist/es/ai-model/workflows/insight/insight-response-parser.mjs +26 -0
  197. package/dist/es/ai-model/workflows/insight/insight-response-parser.mjs.map +1 -0
  198. package/dist/es/ai-model/workflows/insight/order-sensitive.mjs +29 -0
  199. package/dist/es/ai-model/workflows/insight/order-sensitive.mjs.map +1 -0
  200. package/dist/es/ai-model/workflows/planning/conversation-history.mjs +185 -0
  201. package/dist/es/ai-model/workflows/planning/conversation-history.mjs.map +1 -0
  202. package/dist/es/ai-model/workflows/planning/custom-planning.mjs +129 -0
  203. package/dist/es/ai-model/workflows/planning/custom-planning.mjs.map +1 -0
  204. package/dist/es/ai-model/workflows/planning/index.mjs +4 -0
  205. package/dist/es/ai-model/workflows/planning/locate-normalization.mjs +41 -0
  206. package/dist/es/ai-model/workflows/planning/locate-normalization.mjs.map +1 -0
  207. package/dist/es/ai-model/workflows/planning/planning-action-log.mjs +22 -0
  208. package/dist/es/ai-model/workflows/planning/planning-action-log.mjs.map +1 -0
  209. package/dist/es/ai-model/workflows/planning/standard-planning-parser.mjs +99 -0
  210. package/dist/es/ai-model/workflows/planning/standard-planning-parser.mjs.map +1 -0
  211. package/dist/es/ai-model/workflows/planning/standard-planning.mjs +219 -0
  212. package/dist/es/ai-model/workflows/planning/standard-planning.mjs.map +1 -0
  213. package/dist/es/ai-model/workflows/planning/types.mjs +0 -0
  214. package/dist/es/ai-model/workflows/recorder-generation/common.mjs +171 -0
  215. package/dist/es/ai-model/workflows/recorder-generation/common.mjs.map +1 -0
  216. package/dist/es/ai-model/workflows/recorder-generation/index.mjs +5 -0
  217. package/dist/es/ai-model/workflows/recorder-generation/markdown.mjs +253 -0
  218. package/dist/es/ai-model/workflows/recorder-generation/markdown.mjs.map +1 -0
  219. package/dist/es/ai-model/workflows/recorder-generation/metadata.mjs +83 -0
  220. package/dist/es/ai-model/workflows/recorder-generation/metadata.mjs.map +1 -0
  221. package/dist/es/ai-model/workflows/recorder-generation/playwright.mjs +123 -0
  222. package/dist/es/ai-model/workflows/recorder-generation/playwright.mjs.map +1 -0
  223. package/dist/es/ai-model/workflows/recorder-generation/yaml.mjs +162 -0
  224. package/dist/es/ai-model/workflows/recorder-generation/yaml.mjs.map +1 -0
  225. package/dist/es/common.mjs +12 -1
  226. package/dist/es/common.mjs.map +1 -1
  227. package/dist/es/constants.mjs +4 -0
  228. package/dist/es/constants.mjs.map +1 -0
  229. package/dist/es/device/index.mjs.map +1 -1
  230. package/dist/es/device/input-strategy.mjs +34 -0
  231. package/dist/es/device/input-strategy.mjs.map +1 -0
  232. package/dist/es/dump/html-utils.mjs +16 -1
  233. package/dist/es/dump/html-utils.mjs.map +1 -1
  234. package/dist/es/dump/image-reference.mjs +63 -0
  235. package/dist/es/dump/image-reference.mjs.map +1 -0
  236. package/dist/es/dump/report-action-dump.mjs +244 -0
  237. package/dist/es/dump/report-action-dump.mjs.map +1 -0
  238. package/dist/es/dump/report-dump-compactor.mjs +200 -0
  239. package/dist/es/dump/report-dump-compactor.mjs.map +1 -0
  240. package/dist/es/dump/screenshot-store.mjs +124 -37
  241. package/dist/es/dump/screenshot-store.mjs.map +1 -1
  242. package/dist/es/dump/task-service-dump.mjs +17 -0
  243. package/dist/es/dump/task-service-dump.mjs.map +1 -0
  244. package/dist/es/dump/task-status.mjs +18 -0
  245. package/dist/es/dump/task-status.mjs.map +1 -0
  246. package/dist/es/element-describer.mjs +198 -0
  247. package/dist/es/element-describer.mjs.map +1 -0
  248. package/dist/es/errors.mjs +20 -0
  249. package/dist/es/errors.mjs.map +1 -0
  250. package/dist/es/report-html-template.mjs +4 -0
  251. package/dist/es/report-html-template.mjs.map +1 -0
  252. package/dist/es/report-stats.mjs +113 -0
  253. package/dist/es/report-stats.mjs.map +1 -0
  254. package/dist/es/screenshot-item.mjs +7 -2
  255. package/dist/es/screenshot-item.mjs.map +1 -1
  256. package/dist/es/service/index.mjs +10 -5
  257. package/dist/es/service/index.mjs.map +1 -1
  258. package/dist/es/task-runner.mjs.map +1 -1
  259. package/dist/es/types.mjs.map +1 -1
  260. package/dist/es/utils.mjs +1 -1
  261. package/dist/es/yaml/cleanup.mjs +13 -0
  262. package/dist/es/yaml/cleanup.mjs.map +1 -0
  263. package/dist/lib/agent/agent.js +24 -11
  264. package/dist/lib/agent/agent.js.map +1 -1
  265. package/dist/lib/agent/cache-config.js +53 -0
  266. package/dist/lib/agent/cache-config.js.map +1 -0
  267. package/dist/lib/agent/file-chooser.js +125 -0
  268. package/dist/lib/agent/file-chooser.js.map +1 -0
  269. package/dist/lib/agent/insight.js +135 -0
  270. package/dist/lib/agent/insight.js.map +1 -0
  271. package/dist/lib/agent/metrics.js +115 -0
  272. package/dist/lib/agent/metrics.js.map +1 -0
  273. package/dist/lib/agent/progress/ai-act-progress.js +239 -0
  274. package/dist/lib/agent/progress/ai-act-progress.js.map +1 -0
  275. package/dist/lib/agent/progress/index.js +67 -0
  276. package/dist/lib/agent/progress/index.js.map +1 -0
  277. package/dist/lib/agent/progress/progress-bus.js +86 -0
  278. package/dist/lib/agent/progress/progress-bus.js.map +1 -0
  279. package/dist/lib/agent/prompt-context.js +62 -0
  280. package/dist/lib/agent/prompt-context.js.map +1 -0
  281. package/dist/lib/agent/record-to-report.js +48 -0
  282. package/dist/lib/agent/record-to-report.js.map +1 -0
  283. package/dist/lib/agent/run-gherkin-scenario.js +151 -0
  284. package/dist/lib/agent/run-gherkin-scenario.js.map +1 -0
  285. package/dist/lib/agent/run-markdown.js +96 -0
  286. package/dist/lib/agent/run-markdown.js.map +1 -0
  287. package/dist/lib/agent/screenshot-preparation.js +74 -0
  288. package/dist/lib/agent/screenshot-preparation.js.map +1 -0
  289. package/dist/lib/agent/ui-observer.js +425 -0
  290. package/dist/lib/agent/ui-observer.js.map +1 -0
  291. package/dist/lib/agent/utils.js +46 -2
  292. package/dist/lib/agent/utils.js.map +1 -1
  293. package/dist/lib/ai-model/connectivity/fixture.js +45 -0
  294. package/dist/lib/ai-model/connectivity/fixture.js.map +1 -0
  295. package/dist/lib/ai-model/connectivity/index.js +38 -0
  296. package/dist/lib/ai-model/connectivity/index.js.map +1 -0
  297. package/dist/lib/ai-model/connectivity/run-connectivity-test.js +204 -0
  298. package/dist/lib/ai-model/connectivity/run-connectivity-test.js.map +1 -0
  299. package/dist/lib/ai-model/conversation-history.js.map +1 -1
  300. package/dist/lib/ai-model/index.js +15 -11
  301. package/dist/lib/ai-model/inspect.js +1 -1
  302. package/dist/lib/ai-model/inspect.js.map +1 -1
  303. package/dist/lib/ai-model/model-adapter/chat-completion.js +103 -0
  304. package/dist/lib/ai-model/model-adapter/chat-completion.js.map +1 -0
  305. package/dist/lib/ai-model/model-adapter/custom-planning-action.js +40 -0
  306. package/dist/lib/ai-model/model-adapter/custom-planning-action.js.map +1 -0
  307. package/dist/lib/ai-model/model-adapter/custom-planning-types.js +20 -0
  308. package/dist/lib/ai-model/model-adapter/custom-planning-types.js.map +1 -0
  309. package/dist/lib/ai-model/model-adapter/default-insight-protocol.js +62 -0
  310. package/dist/lib/ai-model/model-adapter/default-insight-protocol.js.map +1 -0
  311. package/dist/lib/ai-model/model-adapter/default-locate-protocol.js +182 -0
  312. package/dist/lib/ai-model/model-adapter/default-locate-protocol.js.map +1 -0
  313. package/dist/lib/ai-model/model-adapter/default-planning-protocol.js +170 -0
  314. package/dist/lib/ai-model/model-adapter/default-planning-protocol.js.map +1 -0
  315. package/dist/lib/ai-model/model-adapter/image-preprocess.js +61 -0
  316. package/dist/lib/ai-model/model-adapter/image-preprocess.js.map +1 -0
  317. package/dist/lib/ai-model/model-adapter/index.js +38 -0
  318. package/dist/lib/ai-model/model-adapter/index.js.map +1 -0
  319. package/dist/lib/ai-model/model-adapter/insight-protocol.js +20 -0
  320. package/dist/lib/ai-model/model-adapter/insight-protocol.js.map +1 -0
  321. package/dist/lib/ai-model/model-adapter/insight.js +50 -0
  322. package/dist/lib/ai-model/model-adapter/insight.js.map +1 -0
  323. package/dist/lib/ai-model/model-adapter/locate-protocol.js +20 -0
  324. package/dist/lib/ai-model/model-adapter/locate-protocol.js.map +1 -0
  325. package/dist/lib/ai-model/model-adapter/locate.js +87 -0
  326. package/dist/lib/ai-model/model-adapter/locate.js.map +1 -0
  327. package/dist/lib/ai-model/model-adapter/planning-protocol.js +20 -0
  328. package/dist/lib/ai-model/model-adapter/planning-protocol.js.map +1 -0
  329. package/dist/lib/ai-model/model-adapter/planning.js +86 -0
  330. package/dist/lib/ai-model/model-adapter/planning.js.map +1 -0
  331. package/dist/lib/ai-model/model-adapter/resolve.js +88 -0
  332. package/dist/lib/ai-model/model-adapter/resolve.js.map +1 -0
  333. package/dist/lib/ai-model/model-adapter/types.js +20 -0
  334. package/dist/lib/ai-model/model-adapter/types.js.map +1 -0
  335. package/dist/lib/ai-model/models/auto-glm/actions.js +239 -0
  336. package/dist/lib/ai-model/models/auto-glm/actions.js.map +1 -0
  337. package/dist/lib/ai-model/models/auto-glm/adapter.js +79 -0
  338. package/dist/lib/ai-model/models/auto-glm/adapter.js.map +1 -0
  339. package/dist/lib/ai-model/models/auto-glm/locate.js +45 -0
  340. package/dist/lib/ai-model/models/auto-glm/locate.js.map +1 -0
  341. package/dist/lib/ai-model/models/auto-glm/parser.js +260 -0
  342. package/dist/lib/ai-model/models/auto-glm/parser.js.map +1 -0
  343. package/dist/lib/ai-model/models/auto-glm/planning.js +67 -0
  344. package/dist/lib/ai-model/models/auto-glm/planning.js.map +1 -0
  345. package/dist/lib/ai-model/models/auto-glm/prompt.js +257 -0
  346. package/dist/lib/ai-model/models/auto-glm/prompt.js.map +1 -0
  347. package/dist/lib/ai-model/models/deepseek/adapter.js +113 -0
  348. package/dist/lib/ai-model/models/deepseek/adapter.js.map +1 -0
  349. package/dist/lib/ai-model/models/deepseek/locate-protocol.js +132 -0
  350. package/dist/lib/ai-model/models/deepseek/locate-protocol.js.map +1 -0
  351. package/dist/lib/ai-model/models/default.js +47 -0
  352. package/dist/lib/ai-model/models/default.js.map +1 -0
  353. package/dist/lib/ai-model/models/doubao.js +132 -0
  354. package/dist/lib/ai-model/models/doubao.js.map +1 -0
  355. package/dist/lib/ai-model/models/gemini.js +137 -0
  356. package/dist/lib/ai-model/models/gemini.js.map +1 -0
  357. package/dist/lib/ai-model/models/glm.js +80 -0
  358. package/dist/lib/ai-model/models/glm.js.map +1 -0
  359. package/dist/lib/ai-model/models/gpt.js +77 -0
  360. package/dist/lib/ai-model/models/gpt.js.map +1 -0
  361. package/dist/lib/ai-model/models/index.js +41 -0
  362. package/dist/lib/ai-model/models/index.js.map +1 -0
  363. package/dist/lib/ai-model/models/kimi.js +136 -0
  364. package/dist/lib/ai-model/models/kimi.js.map +1 -0
  365. package/dist/lib/ai-model/models/mimo.js +70 -0
  366. package/dist/lib/ai-model/models/mimo.js.map +1 -0
  367. package/dist/lib/ai-model/models/qwen.js +173 -0
  368. package/dist/lib/ai-model/models/qwen.js.map +1 -0
  369. package/dist/lib/ai-model/models/registry.js +91 -0
  370. package/dist/lib/ai-model/models/registry.js.map +1 -0
  371. package/dist/lib/ai-model/models/ui-tars/actions.js +181 -0
  372. package/dist/lib/ai-model/models/ui-tars/actions.js.map +1 -0
  373. package/dist/lib/ai-model/models/ui-tars/adapter.js +136 -0
  374. package/dist/lib/ai-model/models/ui-tars/adapter.js.map +1 -0
  375. package/dist/lib/ai-model/models/ui-tars/parser.js +74 -0
  376. package/dist/lib/ai-model/models/ui-tars/parser.js.map +1 -0
  377. package/dist/lib/ai-model/models/ui-tars/planning.js +59 -0
  378. package/dist/lib/ai-model/models/ui-tars/planning.js.map +1 -0
  379. package/dist/lib/ai-model/models/ui-tars/prompt.js +73 -0
  380. package/dist/lib/ai-model/models/ui-tars/prompt.js.map +1 -0
  381. package/dist/lib/ai-model/models/utils/intent.js +40 -0
  382. package/dist/lib/ai-model/models/utils/intent.js.map +1 -0
  383. package/dist/lib/ai-model/prompt/insight/index.js +45 -0
  384. package/dist/lib/ai-model/prompt/insight/index.js.map +1 -0
  385. package/dist/lib/ai-model/prompt/insight/system-prompt.js +138 -0
  386. package/dist/lib/ai-model/prompt/insight/system-prompt.js.map +1 -0
  387. package/dist/lib/ai-model/prompt/insight/user-prompt.js +60 -0
  388. package/dist/lib/ai-model/prompt/insight/user-prompt.js.map +1 -0
  389. package/dist/lib/ai-model/prompt/locate/element-system-prompt.js +46 -0
  390. package/dist/lib/ai-model/prompt/locate/element-system-prompt.js.map +1 -0
  391. package/dist/lib/ai-model/prompt/locate/grounding-rules.js +47 -0
  392. package/dist/lib/ai-model/prompt/locate/grounding-rules.js.map +1 -0
  393. package/dist/lib/ai-model/prompt/locate/index.js +46 -0
  394. package/dist/lib/ai-model/prompt/locate/index.js.map +1 -0
  395. package/dist/lib/ai-model/prompt/locate/search-area-system-prompt.js +43 -0
  396. package/dist/lib/ai-model/prompt/locate/search-area-system-prompt.js.map +1 -0
  397. package/dist/lib/ai-model/prompt/planning/action-output-example.js +92 -0
  398. package/dist/lib/ai-model/prompt/planning/action-output-example.js.map +1 -0
  399. package/dist/lib/ai-model/prompt/planning/action-space-description.js +75 -0
  400. package/dist/lib/ai-model/prompt/planning/action-space-description.js.map +1 -0
  401. package/dist/lib/ai-model/prompt/planning/index.js +63 -0
  402. package/dist/lib/ai-model/prompt/planning/index.js.map +1 -0
  403. package/dist/lib/ai-model/prompt/planning/multi-turn-example.js +255 -0
  404. package/dist/lib/ai-model/prompt/planning/multi-turn-example.js.map +1 -0
  405. package/dist/lib/ai-model/prompt/planning/planning-response-example.js +59 -0
  406. package/dist/lib/ai-model/prompt/planning/planning-response-example.js.map +1 -0
  407. package/dist/lib/ai-model/prompt/planning/sub-goals-text.js +51 -0
  408. package/dist/lib/ai-model/prompt/planning/sub-goals-text.js.map +1 -0
  409. package/dist/lib/ai-model/prompt/planning/system-prompt.js +327 -0
  410. package/dist/lib/ai-model/prompt/planning/system-prompt.js.map +1 -0
  411. package/dist/lib/ai-model/service-caller/codex-app-server.js +1 -0
  412. package/dist/lib/ai-model/service-caller/codex-app-server.js.map +1 -1
  413. package/dist/lib/ai-model/service-caller/index.js +35 -16
  414. package/dist/lib/ai-model/service-caller/index.js.map +1 -1
  415. package/dist/lib/ai-model/service-caller/model-call-recorder.js +124 -0
  416. package/dist/lib/ai-model/service-caller/model-call-recorder.js.map +1 -0
  417. package/dist/lib/ai-model/service-caller/openai-error.js +184 -0
  418. package/dist/lib/ai-model/service-caller/openai-error.js.map +1 -0
  419. package/dist/lib/ai-model/service-caller/proxy-deps.node.js +46 -0
  420. package/dist/lib/ai-model/service-caller/proxy-deps.node.js.map +1 -0
  421. package/dist/lib/ai-model/service-caller/proxy-deps.stub.js +49 -0
  422. package/dist/lib/ai-model/service-caller/proxy-deps.stub.js.map +1 -0
  423. package/dist/lib/ai-model/service-caller/semantic-retry.js +70 -0
  424. package/dist/lib/ai-model/service-caller/semantic-retry.js.map +1 -0
  425. package/dist/lib/ai-model/service-caller/types.js +20 -0
  426. package/dist/lib/ai-model/service-caller/types.js.map +1 -0
  427. package/dist/lib/ai-model/shared/action-schema.js +49 -0
  428. package/dist/lib/ai-model/shared/action-schema.js.map +1 -0
  429. package/dist/lib/ai-model/shared/json.js +103 -0
  430. package/dist/lib/ai-model/shared/json.js.map +1 -0
  431. package/dist/lib/ai-model/shared/model-locate-result/bbox.js +106 -0
  432. package/dist/lib/ai-model/shared/model-locate-result/bbox.js.map +1 -0
  433. package/dist/lib/ai-model/shared/model-locate-result/coordinate-distance.js +44 -0
  434. package/dist/lib/ai-model/shared/model-locate-result/coordinate-distance.js.map +1 -0
  435. package/dist/lib/ai-model/shared/model-locate-result/errors.js +46 -0
  436. package/dist/lib/ai-model/shared/model-locate-result/errors.js.map +1 -0
  437. package/dist/lib/ai-model/shared/model-locate-result/factory.js +76 -0
  438. package/dist/lib/ai-model/shared/model-locate-result/factory.js.map +1 -0
  439. package/dist/lib/ai-model/shared/model-locate-result/index.js +66 -0
  440. package/dist/lib/ai-model/shared/model-locate-result/index.js.map +1 -0
  441. package/dist/lib/ai-model/shared/model-locate-result/parse.js +88 -0
  442. package/dist/lib/ai-model/shared/model-locate-result/parse.js.map +1 -0
  443. package/dist/lib/ai-model/shared/model-locate-result/pixel-bbox-mapper.js +101 -0
  444. package/dist/lib/ai-model/shared/model-locate-result/pixel-bbox-mapper.js.map +1 -0
  445. package/dist/lib/ai-model/shared/model-locate-result/prompt-spec.js +156 -0
  446. package/dist/lib/ai-model/shared/model-locate-result/prompt-spec.js.map +1 -0
  447. package/dist/lib/ai-model/shared/model-locate-result/types.js +46 -0
  448. package/dist/lib/ai-model/shared/model-locate-result/types.js.map +1 -0
  449. package/dist/lib/ai-model/shared/multimodal-prompt.js +95 -0
  450. package/dist/lib/ai-model/shared/multimodal-prompt.js.map +1 -0
  451. package/dist/lib/ai-model/shared/xml.js +79 -0
  452. package/dist/lib/ai-model/shared/xml.js.map +1 -0
  453. package/dist/lib/ai-model/workflows/grounding/index.js +46 -0
  454. package/dist/lib/ai-model/workflows/grounding/index.js.map +1 -0
  455. package/dist/lib/ai-model/workflows/grounding/locate-result-rect.js +60 -0
  456. package/dist/lib/ai-model/workflows/grounding/locate-result-rect.js.map +1 -0
  457. package/dist/lib/ai-model/workflows/grounding/locate.js +208 -0
  458. package/dist/lib/ai-model/workflows/grounding/locate.js.map +1 -0
  459. package/dist/lib/ai-model/workflows/grounding/planning-action-locate.js +131 -0
  460. package/dist/lib/ai-model/workflows/grounding/planning-action-locate.js.map +1 -0
  461. package/dist/lib/ai-model/workflows/grounding/search-area-mapping.js +52 -0
  462. package/dist/lib/ai-model/workflows/grounding/search-area-mapping.js.map +1 -0
  463. package/dist/lib/ai-model/workflows/grounding/search-area.js +92 -0
  464. package/dist/lib/ai-model/workflows/grounding/search-area.js.map +1 -0
  465. package/dist/lib/ai-model/workflows/grounding/section-locate.js +180 -0
  466. package/dist/lib/ai-model/workflows/grounding/section-locate.js.map +1 -0
  467. package/dist/lib/ai-model/workflows/grounding/types.js +20 -0
  468. package/dist/lib/ai-model/workflows/grounding/types.js.map +1 -0
  469. package/dist/lib/ai-model/workflows/grounding/utils.js +87 -0
  470. package/dist/lib/ai-model/workflows/grounding/utils.js.map +1 -0
  471. package/dist/lib/ai-model/workflows/insight/extraction.js +135 -0
  472. package/dist/lib/ai-model/workflows/insight/extraction.js.map +1 -0
  473. package/dist/lib/ai-model/workflows/insight/index.js +42 -0
  474. package/dist/lib/ai-model/workflows/insight/index.js.map +1 -0
  475. package/dist/lib/ai-model/workflows/insight/insight-response-parser.js +60 -0
  476. package/dist/lib/ai-model/workflows/insight/insight-response-parser.js.map +1 -0
  477. package/dist/lib/ai-model/workflows/insight/order-sensitive.js +63 -0
  478. package/dist/lib/ai-model/workflows/insight/order-sensitive.js.map +1 -0
  479. package/dist/lib/ai-model/workflows/planning/conversation-history.js +219 -0
  480. package/dist/lib/ai-model/workflows/planning/conversation-history.js.map +1 -0
  481. package/dist/lib/ai-model/workflows/planning/custom-planning.js +166 -0
  482. package/dist/lib/ai-model/workflows/planning/custom-planning.js.map +1 -0
  483. package/dist/lib/ai-model/workflows/planning/index.js +49 -0
  484. package/dist/lib/ai-model/workflows/planning/index.js.map +1 -0
  485. package/dist/lib/ai-model/workflows/planning/locate-normalization.js +75 -0
  486. package/dist/lib/ai-model/workflows/planning/locate-normalization.js.map +1 -0
  487. package/dist/lib/ai-model/workflows/planning/planning-action-log.js +56 -0
  488. package/dist/lib/ai-model/workflows/planning/planning-action-log.js.map +1 -0
  489. package/dist/lib/ai-model/workflows/planning/standard-planning-parser.js +142 -0
  490. package/dist/lib/ai-model/workflows/planning/standard-planning-parser.js.map +1 -0
  491. package/dist/lib/ai-model/workflows/planning/standard-planning.js +253 -0
  492. package/dist/lib/ai-model/workflows/planning/standard-planning.js.map +1 -0
  493. package/dist/lib/ai-model/workflows/planning/types.js +20 -0
  494. package/dist/lib/ai-model/workflows/planning/types.js.map +1 -0
  495. package/dist/lib/ai-model/workflows/recorder-generation/common.js +232 -0
  496. package/dist/lib/ai-model/workflows/recorder-generation/common.js.map +1 -0
  497. package/dist/lib/ai-model/workflows/recorder-generation/index.js +68 -0
  498. package/dist/lib/ai-model/workflows/recorder-generation/index.js.map +1 -0
  499. package/dist/lib/ai-model/workflows/recorder-generation/markdown.js +293 -0
  500. package/dist/lib/ai-model/workflows/recorder-generation/markdown.js.map +1 -0
  501. package/dist/lib/ai-model/workflows/recorder-generation/metadata.js +117 -0
  502. package/dist/lib/ai-model/workflows/recorder-generation/metadata.js.map +1 -0
  503. package/dist/lib/ai-model/workflows/recorder-generation/playwright.js +184 -0
  504. package/dist/lib/ai-model/workflows/recorder-generation/playwright.js.map +1 -0
  505. package/dist/lib/ai-model/workflows/recorder-generation/yaml.js +232 -0
  506. package/dist/lib/ai-model/workflows/recorder-generation/yaml.js.map +1 -0
  507. package/dist/lib/common.js +18 -1
  508. package/dist/lib/common.js.map +1 -1
  509. package/dist/lib/constants.js +38 -0
  510. package/dist/lib/constants.js.map +1 -0
  511. package/dist/lib/device/index.js.map +1 -1
  512. package/dist/lib/device/input-strategy.js +80 -0
  513. package/dist/lib/device/input-strategy.js.map +1 -0
  514. package/dist/lib/dump/html-utils.js +18 -0
  515. package/dist/lib/dump/html-utils.js.map +1 -1
  516. package/dist/lib/dump/image-reference.js +115 -0
  517. package/dist/lib/dump/image-reference.js.map +1 -0
  518. package/dist/lib/dump/report-action-dump.js +284 -0
  519. package/dist/lib/dump/report-action-dump.js.map +1 -0
  520. package/dist/lib/dump/report-dump-compactor.js +234 -0
  521. package/dist/lib/dump/report-dump-compactor.js.map +1 -0
  522. package/dist/lib/dump/screenshot-store.js +146 -38
  523. package/dist/lib/dump/screenshot-store.js.map +1 -1
  524. package/dist/lib/dump/task-service-dump.js +54 -0
  525. package/dist/lib/dump/task-service-dump.js.map +1 -0
  526. package/dist/lib/dump/task-status.js +55 -0
  527. package/dist/lib/dump/task-status.js.map +1 -0
  528. package/dist/lib/element-describer.js +238 -0
  529. package/dist/lib/element-describer.js.map +1 -0
  530. package/dist/lib/errors.js +54 -0
  531. package/dist/lib/errors.js.map +1 -0
  532. package/dist/lib/report-html-template.js +38 -0
  533. package/dist/lib/report-html-template.js.map +1 -0
  534. package/dist/lib/report-stats.js +147 -0
  535. package/dist/lib/report-stats.js.map +1 -0
  536. package/dist/lib/screenshot-item.js +7 -2
  537. package/dist/lib/screenshot-item.js.map +1 -1
  538. package/dist/lib/service/index.js +10 -5
  539. package/dist/lib/service/index.js.map +1 -1
  540. package/dist/lib/task-runner.js.map +1 -1
  541. package/dist/lib/types.js +2 -2
  542. package/dist/lib/types.js.map +1 -1
  543. package/dist/lib/utils.js +1 -1
  544. package/dist/lib/yaml/cleanup.js +47 -0
  545. package/dist/lib/yaml/cleanup.js.map +1 -0
  546. package/dist/types/agent/agent.d.ts +5 -9
  547. package/dist/types/agent/cache-config.d.ts +2 -0
  548. package/dist/types/agent/file-chooser.d.ts +19 -0
  549. package/dist/types/agent/insight.d.ts +21 -0
  550. package/dist/types/agent/metrics.d.ts +48 -0
  551. package/dist/types/agent/progress/ai-act-progress.d.ts +21 -0
  552. package/dist/types/agent/progress/index.d.ts +2 -0
  553. package/dist/types/agent/progress/progress-bus.d.ts +33 -0
  554. package/dist/types/agent/prompt-context.d.ts +3 -0
  555. package/dist/types/agent/record-to-report.d.ts +2 -0
  556. package/dist/types/agent/run-gherkin-scenario.d.ts +26 -0
  557. package/dist/types/agent/run-markdown.d.ts +6 -0
  558. package/dist/types/agent/screenshot-preparation.d.ts +20 -0
  559. package/dist/types/agent/ui-observer.d.ts +103 -0
  560. package/dist/types/agent/utils.d.ts +12 -1
  561. package/dist/types/ai-model/connectivity/fixture.d.ts +5 -0
  562. package/dist/types/ai-model/connectivity/index.d.ts +1 -0
  563. package/dist/types/ai-model/connectivity/run-connectivity-test.d.ts +11 -0
  564. package/dist/types/ai-model/index.d.ts +2 -0
  565. package/dist/types/ai-model/model-adapter/chat-completion.d.ts +2 -0
  566. package/dist/types/ai-model/model-adapter/custom-planning-action.d.ts +25 -0
  567. package/dist/types/ai-model/model-adapter/custom-planning-types.d.ts +31 -0
  568. package/dist/types/ai-model/model-adapter/default-insight-protocol.d.ts +2 -0
  569. package/dist/types/ai-model/model-adapter/default-locate-protocol.d.ts +7 -0
  570. package/dist/types/ai-model/model-adapter/default-planning-protocol.d.ts +25 -0
  571. package/dist/types/ai-model/model-adapter/image-preprocess.d.ts +30 -0
  572. package/dist/types/ai-model/model-adapter/index.d.ts +2 -0
  573. package/dist/types/ai-model/model-adapter/insight-protocol.d.ts +24 -0
  574. package/dist/types/ai-model/model-adapter/insight.d.ts +3 -0
  575. package/dist/types/ai-model/model-adapter/locate-protocol.d.ts +23 -0
  576. package/dist/types/ai-model/model-adapter/locate.d.ts +4 -0
  577. package/dist/types/ai-model/model-adapter/planning-protocol.d.ts +53 -0
  578. package/dist/types/ai-model/model-adapter/planning.d.ts +6 -0
  579. package/dist/types/ai-model/model-adapter/resolve.d.ts +12 -0
  580. package/dist/types/ai-model/model-adapter/types.d.ts +218 -0
  581. package/dist/types/ai-model/models/auto-glm/actions.d.ts +81 -0
  582. package/dist/types/ai-model/models/auto-glm/adapter.d.ts +5 -0
  583. package/dist/types/ai-model/models/auto-glm/locate.d.ts +2 -0
  584. package/dist/types/ai-model/models/auto-glm/parser.d.ts +14 -0
  585. package/dist/types/ai-model/models/auto-glm/planning.d.ts +5 -0
  586. package/dist/types/ai-model/models/auto-glm/prompt.d.ts +4 -0
  587. package/dist/types/ai-model/models/deepseek/adapter.d.ts +39 -0
  588. package/dist/types/ai-model/models/deepseek/locate-protocol.d.ts +5 -0
  589. package/dist/types/ai-model/models/default.d.ts +2 -0
  590. package/dist/types/ai-model/models/doubao.d.ts +7 -0
  591. package/dist/types/ai-model/models/gemini.d.ts +37 -0
  592. package/dist/types/ai-model/models/glm.d.ts +21 -0
  593. package/dist/types/ai-model/models/gpt.d.ts +20 -0
  594. package/dist/types/ai-model/models/index.d.ts +2 -0
  595. package/dist/types/ai-model/models/kimi.d.ts +45 -0
  596. package/dist/types/ai-model/models/mimo.d.ts +10 -0
  597. package/dist/types/ai-model/models/qwen.d.ts +33 -0
  598. package/dist/types/ai-model/models/registry.d.ts +187 -0
  599. package/dist/types/ai-model/models/ui-tars/actions.d.ts +3 -0
  600. package/dist/types/ai-model/models/ui-tars/adapter.d.ts +6 -0
  601. package/dist/types/ai-model/models/ui-tars/parser.d.ts +72 -0
  602. package/dist/types/ai-model/models/ui-tars/planning.d.ts +4 -0
  603. package/dist/types/ai-model/models/ui-tars/prompt.d.ts +2 -0
  604. package/dist/types/ai-model/models/utils/intent.d.ts +2 -0
  605. package/dist/types/ai-model/prompt/insight/index.d.ts +2 -0
  606. package/dist/types/ai-model/prompt/insight/system-prompt.d.ts +6 -0
  607. package/dist/types/ai-model/prompt/insight/user-prompt.d.ts +3 -0
  608. package/dist/types/ai-model/prompt/locate/element-system-prompt.d.ts +4 -0
  609. package/dist/types/ai-model/prompt/locate/grounding-rules.d.ts +1 -0
  610. package/dist/types/ai-model/prompt/locate/index.d.ts +3 -0
  611. package/dist/types/ai-model/prompt/locate/search-area-system-prompt.d.ts +4 -0
  612. package/dist/types/ai-model/prompt/planning/action-output-example.d.ts +17 -0
  613. package/dist/types/ai-model/prompt/planning/action-space-description.d.ts +11 -0
  614. package/dist/types/ai-model/prompt/planning/index.d.ts +6 -0
  615. package/dist/types/ai-model/prompt/planning/multi-turn-example.d.ts +10 -0
  616. package/dist/types/ai-model/prompt/planning/planning-response-example.d.ts +28 -0
  617. package/dist/types/ai-model/prompt/planning/sub-goals-text.d.ts +2 -0
  618. package/dist/types/ai-model/prompt/planning/system-prompt.d.ts +18 -0
  619. package/dist/types/ai-model/service-caller/index.d.ts +21 -6
  620. package/dist/types/ai-model/service-caller/model-call-recorder.d.ts +12 -0
  621. package/dist/types/ai-model/service-caller/openai-error.d.ts +26 -0
  622. package/dist/types/ai-model/service-caller/proxy-deps.node.d.ts +2 -0
  623. package/dist/types/ai-model/service-caller/proxy-deps.stub.d.ts +2 -0
  624. package/dist/types/ai-model/service-caller/semantic-retry.d.ts +30 -0
  625. package/dist/types/ai-model/service-caller/types.d.ts +2 -0
  626. package/dist/types/ai-model/shared/action-schema.d.ts +4 -0
  627. package/dist/types/ai-model/shared/json.d.ts +26 -0
  628. package/dist/types/ai-model/shared/model-locate-result/bbox.d.ts +6 -0
  629. package/dist/types/ai-model/shared/model-locate-result/coordinate-distance.d.ts +4 -0
  630. package/dist/types/ai-model/shared/model-locate-result/errors.d.ts +2 -0
  631. package/dist/types/ai-model/shared/model-locate-result/factory.d.ts +3 -0
  632. package/dist/types/ai-model/shared/model-locate-result/index.d.ts +7 -0
  633. package/dist/types/ai-model/shared/model-locate-result/parse.d.ts +8 -0
  634. package/dist/types/ai-model/shared/model-locate-result/pixel-bbox-mapper.d.ts +7 -0
  635. package/dist/types/ai-model/shared/model-locate-result/prompt-spec.d.ts +6 -0
  636. package/dist/types/ai-model/shared/model-locate-result/types.d.ts +150 -0
  637. package/dist/types/ai-model/shared/multimodal-prompt.d.ts +13 -0
  638. package/dist/types/ai-model/shared/xml.d.ts +15 -0
  639. package/dist/types/ai-model/workflows/grounding/index.d.ts +3 -0
  640. package/dist/types/ai-model/workflows/grounding/locate-result-rect.d.ts +5 -0
  641. package/dist/types/ai-model/workflows/grounding/locate.d.ts +7 -0
  642. package/dist/types/ai-model/workflows/grounding/planning-action-locate.d.ts +4 -0
  643. package/dist/types/ai-model/workflows/grounding/search-area-mapping.d.ts +4 -0
  644. package/dist/types/ai-model/workflows/grounding/search-area.d.ts +18 -0
  645. package/dist/types/ai-model/workflows/grounding/section-locate.d.ts +16 -0
  646. package/dist/types/ai-model/workflows/grounding/types.d.ts +56 -0
  647. package/dist/types/ai-model/workflows/grounding/utils.d.ts +25 -0
  648. package/dist/types/ai-model/workflows/insight/extraction.d.ts +18 -0
  649. package/dist/types/ai-model/workflows/insight/index.d.ts +2 -0
  650. package/dist/types/ai-model/workflows/insight/insight-response-parser.d.ts +4 -0
  651. package/dist/types/ai-model/workflows/insight/order-sensitive.d.ts +6 -0
  652. package/dist/types/ai-model/workflows/planning/conversation-history.d.ts +105 -0
  653. package/dist/types/ai-model/workflows/planning/custom-planning.d.ts +7 -0
  654. package/dist/types/ai-model/workflows/planning/index.d.ts +3 -0
  655. package/dist/types/ai-model/workflows/planning/locate-normalization.d.ts +12 -0
  656. package/dist/types/ai-model/workflows/planning/planning-action-log.d.ts +2 -0
  657. package/dist/types/ai-model/workflows/planning/standard-planning-parser.d.ts +31 -0
  658. package/dist/types/ai-model/workflows/planning/standard-planning.d.ts +4 -0
  659. package/dist/types/ai-model/workflows/planning/types.d.ts +16 -0
  660. package/dist/types/ai-model/workflows/recorder-generation/common.d.ts +89 -0
  661. package/dist/types/ai-model/workflows/recorder-generation/index.d.ts +7 -0
  662. package/dist/types/ai-model/workflows/recorder-generation/markdown.d.ts +7 -0
  663. package/dist/types/ai-model/workflows/recorder-generation/metadata.d.ts +13 -0
  664. package/dist/types/ai-model/workflows/recorder-generation/playwright.d.ts +26 -0
  665. package/dist/types/ai-model/workflows/recorder-generation/yaml.d.ts +17 -0
  666. package/dist/types/common.d.ts +2 -0
  667. package/dist/types/constants.d.ts +1 -0
  668. package/dist/types/device/index.d.ts +15 -4
  669. package/dist/types/device/input-strategy.d.ts +44 -0
  670. package/dist/types/dump/html-utils.d.ts +1 -0
  671. package/dist/types/dump/image-reference.d.ts +36 -0
  672. package/dist/types/dump/report-action-dump.d.ts +127 -0
  673. package/dist/types/dump/report-dump-compactor.d.ts +7 -0
  674. package/dist/types/dump/screenshot-store.d.ts +32 -15
  675. package/dist/types/dump/task-service-dump.d.ts +3 -0
  676. package/dist/types/dump/task-status.d.ts +41 -0
  677. package/dist/types/element-describer.d.ts +43 -0
  678. package/dist/types/errors.d.ts +5 -0
  679. package/dist/types/report-html-template.d.ts +1 -0
  680. package/dist/types/report-stats.d.ts +39 -0
  681. package/dist/types/screenshot-item.d.ts +1 -0
  682. package/dist/types/service/index.d.ts +6 -2
  683. package/dist/types/task-runner.d.ts +6 -0
  684. package/dist/types/types.d.ts +98 -5
  685. package/dist/types/yaml/cleanup.d.ts +2 -0
  686. package/package.json +2 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-model/models/ui-tars/adapter.mjs","sources":["../../../../../src/ai-model/models/ui-tars/adapter.ts"],"sourcesContent":["import { type TModelFamily, UITarsModelVersion } from '@aiscene/shared/env';\nimport { assert } from '@aiscene/shared/utils';\nimport type { ModelAdapterDefinition } from '../../model-adapter/types';\nimport {\n type LocateResultValue,\n createLocateResultValue,\n unwrapCoordinateListLikeInput,\n} from '../../shared/model-locate-result';\nimport { createUiTarsPlanner } from './planning';\n\nconst defaultVlmUiTarsReplanningCycleLimit = 40;\nconst uiTarsBboxCoordinatesMeta = {\n shape: 'bbox',\n order: 'xy',\n normalizedBy: 1000,\n} as const;\nconst uiTarsPointCoordinatesMeta = {\n shape: 'point',\n order: 'xy',\n normalizedBy: 1000,\n} as const;\n\n// UI-TARS has not received active updates for a long time, so this parser is\n// intentionally kept separate from Doubao even though the current logic is the\n// same. This avoids coupling UI-TARS behavior to future Doubao adapter changes.\nfunction parseUiTarsRawLocateValue(input: unknown): LocateResultValue {\n const bbox = unwrapCoordinateListLikeInput(input as any);\n if (typeof bbox === 'string') {\n assert(\n /^(\\d+)\\s(\\d+)\\s(\\d+)\\s(\\d+)$/.test(bbox.trim()),\n `invalid bbox data string for ui-tars mode: ${bbox}`,\n );\n const splitted = bbox.split(' ');\n if (splitted.length === 4) {\n return createLocateResultValue(uiTarsBboxCoordinatesMeta, [\n Number(splitted[0]),\n Number(splitted[1]),\n Number(splitted[2]),\n Number(splitted[3]),\n ]);\n }\n throw new Error(`invalid bbox data string for ui-tars mode: ${bbox}`);\n }\n\n let bboxList: number[] = [];\n if (Array.isArray(bbox) && typeof bbox[0] === 'string') {\n bbox.forEach((item) => {\n if (typeof item === 'string' && item.includes(',')) {\n const [x, y] = item.split(',');\n bboxList.push(Number(x.trim()), Number(y.trim()));\n } else if (typeof item === 'string' && item.includes(' ')) {\n const [x, y] = item.split(' ');\n bboxList.push(Number(x.trim()), Number(y.trim()));\n } else {\n bboxList.push(Number(item));\n }\n });\n } else {\n bboxList = bbox as number[];\n }\n\n if (bboxList.length === 4 || bboxList.length === 5) {\n return createLocateResultValue(uiTarsBboxCoordinatesMeta, [\n bboxList[0],\n bboxList[1],\n bboxList[2],\n bboxList[3],\n ]);\n }\n\n if (\n bboxList.length === 6 ||\n bboxList.length === 2 ||\n bboxList.length === 3 ||\n bboxList.length === 7\n ) {\n return createLocateResultValue(uiTarsPointCoordinatesMeta, [\n bboxList[0],\n bboxList[1],\n ]);\n }\n\n if (bbox.length === 8) {\n return createLocateResultValue(uiTarsBboxCoordinatesMeta, [\n bboxList[0],\n bboxList[1],\n bboxList[4],\n bboxList[5],\n ]);\n }\n\n const msg = `invalid bbox data for ui-tars mode: ${JSON.stringify(bbox)} `;\n throw new Error(msg);\n}\n\nfunction createUiTarsAdapter(\n uiTarsModelVersion: UITarsModelVersion,\n): ModelAdapterDefinition {\n return {\n chatCompletion: {\n unsupportedUserConfig: [\n 'reasoningEnabled',\n 'reasoningEffort',\n 'reasoningBudget',\n ],\n buildChatCompletionParams: ({ midsceneDefaults, userConfig }) => {\n const commonOverrideConfig: Record<string, unknown> = {};\n\n if (userConfig.temperature !== undefined) {\n commonOverrideConfig.temperature = userConfig.temperature;\n }\n\n return {\n config: {\n ...midsceneDefaults,\n ...commonOverrideConfig,\n },\n };\n },\n },\n planning: {\n kind: 'custom',\n cacheEnabled: false,\n defaultReplanningCycleLimit: defaultVlmUiTarsReplanningCycleLimit,\n planner: createUiTarsPlanner(uiTarsModelVersion),\n },\n locate: {\n element: {\n resultFormat: {\n coordinates: uiTarsBboxCoordinatesMeta,\n parseRawLocateValue: parseUiTarsRawLocateValue,\n },\n },\n },\n };\n}\n\nconst uiTarsDoubao15Adapter = createUiTarsAdapter(\n UITarsModelVersion.DOUBAO_1_5_20B,\n);\n\nexport const uiTarsAdapters = {\n 'vlm-ui-tars': createUiTarsAdapter(UITarsModelVersion.V1_0),\n 'vlm-ui-tars-doubao': uiTarsDoubao15Adapter,\n 'vlm-ui-tars-doubao-1.5': uiTarsDoubao15Adapter,\n} satisfies Pick<\n Record<TModelFamily, ModelAdapterDefinition>,\n 'vlm-ui-tars' | 'vlm-ui-tars-doubao' | 'vlm-ui-tars-doubao-1.5'\n>;\n"],"names":["defaultVlmUiTarsReplanningCycleLimit","uiTarsBboxCoordinatesMeta","uiTarsPointCoordinatesMeta","parseUiTarsRawLocateValue","input","bbox","unwrapCoordinateListLikeInput","assert","splitted","createLocateResultValue","Number","Error","bboxList","Array","item","x","y","msg","JSON","createUiTarsAdapter","uiTarsModelVersion","midsceneDefaults","userConfig","commonOverrideConfig","undefined","createUiTarsPlanner","uiTarsDoubao15Adapter","UITarsModelVersion","uiTarsAdapters"],"mappings":";;;;AAUA,MAAMA,uCAAuC;AAC7C,MAAMC,4BAA4B;IAChC,OAAO;IACP,OAAO;IACP,cAAc;AAChB;AACA,MAAMC,6BAA6B;IACjC,OAAO;IACP,OAAO;IACP,cAAc;AAChB;AAKA,SAASC,0BAA0BC,KAAc;IAC/C,MAAMC,OAAOC,8BAA8BF;IAC3C,IAAI,AAAgB,YAAhB,OAAOC,MAAmB;QAC5BE,OACE,+BAA+B,IAAI,CAACF,KAAK,IAAI,KAC7C,CAAC,2CAA2C,EAAEA,MAAM;QAEtD,MAAMG,WAAWH,KAAK,KAAK,CAAC;QAC5B,IAAIG,AAAoB,MAApBA,SAAS,MAAM,EACjB,OAAOC,wBAAwBR,2BAA2B;YACxDS,OAAOF,QAAQ,CAAC,EAAE;YAClBE,OAAOF,QAAQ,CAAC,EAAE;YAClBE,OAAOF,QAAQ,CAAC,EAAE;YAClBE,OAAOF,QAAQ,CAAC,EAAE;SACnB;QAEH,MAAM,IAAIG,MAAM,CAAC,2CAA2C,EAAEN,MAAM;IACtE;IAEA,IAAIO,WAAqB,EAAE;IAC3B,IAAIC,MAAM,OAAO,CAACR,SAAS,AAAmB,YAAnB,OAAOA,IAAI,CAAC,EAAE,EACvCA,KAAK,OAAO,CAAC,CAACS;QACZ,IAAI,AAAgB,YAAhB,OAAOA,QAAqBA,KAAK,QAAQ,CAAC,MAAM;YAClD,MAAM,CAACC,GAAGC,EAAE,GAAGF,KAAK,KAAK,CAAC;YAC1BF,SAAS,IAAI,CAACF,OAAOK,EAAE,IAAI,KAAKL,OAAOM,EAAE,IAAI;QAC/C,OAAO,IAAI,AAAgB,YAAhB,OAAOF,QAAqBA,KAAK,QAAQ,CAAC,MAAM;YACzD,MAAM,CAACC,GAAGC,EAAE,GAAGF,KAAK,KAAK,CAAC;YAC1BF,SAAS,IAAI,CAACF,OAAOK,EAAE,IAAI,KAAKL,OAAOM,EAAE,IAAI;QAC/C,OACEJ,SAAS,IAAI,CAACF,OAAOI;IAEzB;SAEAF,WAAWP;IAGb,IAAIO,AAAoB,MAApBA,SAAS,MAAM,IAAUA,AAAoB,MAApBA,SAAS,MAAM,EAC1C,OAAOH,wBAAwBR,2BAA2B;QACxDW,QAAQ,CAAC,EAAE;QACXA,QAAQ,CAAC,EAAE;QACXA,QAAQ,CAAC,EAAE;QACXA,QAAQ,CAAC,EAAE;KACZ;IAGH,IACEA,AAAoB,MAApBA,SAAS,MAAM,IACfA,AAAoB,MAApBA,SAAS,MAAM,IACfA,AAAoB,MAApBA,SAAS,MAAM,IACfA,AAAoB,MAApBA,SAAS,MAAM,EAEf,OAAOH,wBAAwBP,4BAA4B;QACzDU,QAAQ,CAAC,EAAE;QACXA,QAAQ,CAAC,EAAE;KACZ;IAGH,IAAIP,AAAgB,MAAhBA,KAAK,MAAM,EACb,OAAOI,wBAAwBR,2BAA2B;QACxDW,QAAQ,CAAC,EAAE;QACXA,QAAQ,CAAC,EAAE;QACXA,QAAQ,CAAC,EAAE;QACXA,QAAQ,CAAC,EAAE;KACZ;IAGH,MAAMK,MAAM,CAAC,oCAAoC,EAAEC,KAAK,SAAS,CAACb,MAAM,CAAC,CAAC;IAC1E,MAAM,IAAIM,MAAMM;AAClB;AAEA,SAASE,oBACPC,kBAAsC;IAEtC,OAAO;QACL,gBAAgB;YACd,uBAAuB;gBACrB;gBACA;gBACA;aACD;YACD,2BAA2B,CAAC,EAAEC,gBAAgB,EAAEC,UAAU,EAAE;gBAC1D,MAAMC,uBAAgD,CAAC;gBAEvD,IAAID,AAA2BE,WAA3BF,WAAW,WAAW,EACxBC,qBAAqB,WAAW,GAAGD,WAAW,WAAW;gBAG3D,OAAO;oBACL,QAAQ;wBACN,GAAGD,gBAAgB;wBACnB,GAAGE,oBAAoB;oBACzB;gBACF;YACF;QACF;QACA,UAAU;YACR,MAAM;YACN,cAAc;YACd,6BAA6BvB;YAC7B,SAASyB,oBAAoBL;QAC/B;QACA,QAAQ;YACN,SAAS;gBACP,cAAc;oBACZ,aAAanB;oBACb,qBAAqBE;gBACvB;YACF;QACF;IACF;AACF;AAEA,MAAMuB,wBAAwBP,oBAC5BQ,mBAAmB,cAAc;AAG5B,MAAMC,iBAAiB;IAC5B,eAAeT,oBAAoBQ,mBAAmB,IAAI;IAC1D,sBAAsBD;IACtB,0BAA0BA;AAC5B"}
@@ -0,0 +1,40 @@
1
+ import { getDebug } from "@aiscene/shared/logger";
2
+ import { actionParser } from "@ui-tars/action-parser";
3
+ const debug = getDebug('ui-tars-planning');
4
+ function parseUiTarsPlanningResponse(rawResponse, shotSize, uiTarsModelVersion) {
5
+ const convertedText = convertBboxToCoordinates(rawResponse);
6
+ const parseResult = actionParser({
7
+ prediction: convertedText,
8
+ factor: [
9
+ 1000,
10
+ 1000
11
+ ],
12
+ screenContext: {
13
+ width: shotSize.width,
14
+ height: shotSize.height
15
+ },
16
+ modelVer: uiTarsModelVersion
17
+ });
18
+ debug('ui-tars modelVer', uiTarsModelVersion, ', parsed', JSON.stringify(parseResult.parsed));
19
+ return {
20
+ rawResponse,
21
+ actions: parseResult.parsed
22
+ };
23
+ }
24
+ function convertBboxToCoordinates(text) {
25
+ const pattern = /<bbox>(\d+)\s+(\d+)\s+(\d+)\s+(\d+)<\/bbox>/g;
26
+ function replaceMatch(match, x1, y1, x2, y2) {
27
+ const x1Num = Number.parseInt(x1, 10);
28
+ const y1Num = Number.parseInt(y1, 10);
29
+ const x2Num = Number.parseInt(x2, 10);
30
+ const y2Num = Number.parseInt(y2, 10);
31
+ const x = Math.floor((x1Num + x2Num) / 2);
32
+ const y = Math.floor((y1Num + y2Num) / 2);
33
+ return `(${x},${y})`;
34
+ }
35
+ const cleanedText = text.replace(/\[EOS\]/g, '').replace(/```(?:[a-zA-Z0-9_-]+)?/g, '');
36
+ return cleanedText.replace(pattern, replaceMatch).trim();
37
+ }
38
+ export { parseUiTarsPlanningResponse };
39
+
40
+ //# sourceMappingURL=parser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-model/models/ui-tars/parser.mjs","sources":["../../../../../src/ai-model/models/ui-tars/parser.ts"],"sourcesContent":["import type { Size } from '@/types';\nimport type { UITarsModelVersion } from '@aiscene/shared/env';\nimport { getDebug } from '@aiscene/shared/logger';\nimport { actionParser } from '@ui-tars/action-parser';\n\ntype ActionType =\n | 'click'\n | 'left_double'\n | 'right_single'\n | 'drag'\n | 'type'\n | 'hotkey'\n | 'finished'\n | 'scroll'\n | 'wait';\n\nconst debug = getDebug('ui-tars-planning');\n\nexport interface UiTarsParsedPlanningResponse {\n rawResponse: string;\n actions: ReturnType<typeof actionParser>['parsed'];\n}\n\nexport function parseUiTarsPlanningResponse(\n rawResponse: string,\n shotSize: Size,\n uiTarsModelVersion: UITarsModelVersion,\n): UiTarsParsedPlanningResponse {\n const convertedText = convertBboxToCoordinates(rawResponse);\n const parseResult = actionParser({\n prediction: convertedText,\n factor: [1000, 1000],\n screenContext: {\n width: shotSize.width,\n height: shotSize.height,\n },\n modelVer: uiTarsModelVersion,\n });\n\n debug(\n 'ui-tars modelVer',\n uiTarsModelVersion,\n ', parsed',\n JSON.stringify(parseResult.parsed),\n );\n\n return {\n rawResponse,\n actions: parseResult.parsed,\n };\n}\n\n/**\n * Converts bounding box notation to coordinate points.\n */\nfunction convertBboxToCoordinates(text: string): string {\n const pattern = /<bbox>(\\d+)\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)<\\/bbox>/g;\n\n function replaceMatch(\n match: string,\n x1: string,\n y1: string,\n x2: string,\n y2: string,\n ): string {\n const x1Num = Number.parseInt(x1, 10);\n const y1Num = Number.parseInt(y1, 10);\n const x2Num = Number.parseInt(x2, 10);\n const y2Num = Number.parseInt(y2, 10);\n\n const x = Math.floor((x1Num + x2Num) / 2);\n const y = Math.floor((y1Num + y2Num) / 2);\n\n return `(${x},${y})`;\n }\n\n const cleanedText = text\n .replace(/\\[EOS\\]/g, '')\n .replace(/```(?:[a-zA-Z0-9_-]+)?/g, '');\n return cleanedText.replace(pattern, replaceMatch).trim();\n}\n\ninterface BaseAction {\n action_type: ActionType;\n action_inputs: Record<string, any>;\n reflection: string | null;\n thought: string | null;\n}\n\ninterface ClickAction extends BaseAction {\n action_type: 'click';\n action_inputs: {\n start_box: string;\n };\n}\n\ninterface DragAction extends BaseAction {\n action_type: 'drag';\n action_inputs: {\n start_box: string;\n end_box: string;\n };\n}\n\ninterface WaitAction extends BaseAction {\n action_type: 'wait';\n action_inputs: {\n time: string;\n };\n}\n\ninterface LeftDoubleAction extends BaseAction {\n action_type: 'left_double';\n action_inputs: {\n start_box: string;\n };\n}\n\ninterface RightSingleAction extends BaseAction {\n action_type: 'right_single';\n action_inputs: {\n start_box: string;\n };\n}\n\ninterface TypeAction extends BaseAction {\n action_type: 'type';\n action_inputs: {\n content: string;\n };\n}\n\ninterface HotkeyAction extends BaseAction {\n action_type: 'hotkey';\n action_inputs: {\n key: string;\n };\n}\n\ninterface ScrollAction extends BaseAction {\n action_type: 'scroll';\n action_inputs: {\n direction: 'up' | 'down';\n };\n}\n\ninterface FinishedAction extends BaseAction {\n action_type: 'finished';\n action_inputs: {\n content?: string;\n };\n}\n\nexport type Action =\n | ClickAction\n | LeftDoubleAction\n | RightSingleAction\n | DragAction\n | TypeAction\n | HotkeyAction\n | ScrollAction\n | FinishedAction\n | WaitAction;\n"],"names":["debug","getDebug","parseUiTarsPlanningResponse","rawResponse","shotSize","uiTarsModelVersion","convertedText","convertBboxToCoordinates","parseResult","actionParser","JSON","text","pattern","replaceMatch","match","x1","y1","x2","y2","x1Num","Number","y1Num","x2Num","y2Num","x","Math","y","cleanedText"],"mappings":";;AAgBA,MAAMA,QAAQC,SAAS;AAOhB,SAASC,4BACdC,WAAmB,EACnBC,QAAc,EACdC,kBAAsC;IAEtC,MAAMC,gBAAgBC,yBAAyBJ;IAC/C,MAAMK,cAAcC,aAAa;QAC/B,YAAYH;QACZ,QAAQ;YAAC;YAAM;SAAK;QACpB,eAAe;YACb,OAAOF,SAAS,KAAK;YACrB,QAAQA,SAAS,MAAM;QACzB;QACA,UAAUC;IACZ;IAEAL,MACE,oBACAK,oBACA,YACAK,KAAK,SAAS,CAACF,YAAY,MAAM;IAGnC,OAAO;QACLL;QACA,SAASK,YAAY,MAAM;IAC7B;AACF;AAKA,SAASD,yBAAyBI,IAAY;IAC5C,MAAMC,UAAU;IAEhB,SAASC,aACPC,KAAa,EACbC,EAAU,EACVC,EAAU,EACVC,EAAU,EACVC,EAAU;QAEV,MAAMC,QAAQC,OAAO,QAAQ,CAACL,IAAI;QAClC,MAAMM,QAAQD,OAAO,QAAQ,CAACJ,IAAI;QAClC,MAAMM,QAAQF,OAAO,QAAQ,CAACH,IAAI;QAClC,MAAMM,QAAQH,OAAO,QAAQ,CAACF,IAAI;QAElC,MAAMM,IAAIC,KAAK,KAAK,CAAEN,AAAAA,CAAAA,QAAQG,KAAI,IAAK;QACvC,MAAMI,IAAID,KAAK,KAAK,CAAEJ,AAAAA,CAAAA,QAAQE,KAAI,IAAK;QAEvC,OAAO,CAAC,CAAC,EAAEC,EAAE,CAAC,EAAEE,EAAE,CAAC,CAAC;IACtB;IAEA,MAAMC,cAAchB,KACjB,OAAO,CAAC,YAAY,IACpB,OAAO,CAAC,2BAA2B;IACtC,OAAOgB,YAAY,OAAO,CAACf,SAASC,cAAc,IAAI;AACxD"}
@@ -0,0 +1,25 @@
1
+ import { transformUiTarsActions } from "./actions.mjs";
2
+ import { parseUiTarsPlanningResponse } from "./parser.mjs";
3
+ import { getSummary, getUiTarsPlanningPrompt } from "./prompt.mjs";
4
+ function createUiTarsPlanner(uiTarsModelVersion) {
5
+ return {
6
+ messages: {
7
+ systemPromptPlacement: 'user-message',
8
+ buildSystemPrompt: getUiTarsPlanningPrompt,
9
+ buildUserInstruction: (instruction)=>`<user_instruction>${instruction}</user_instruction>`,
10
+ buildAssistantContent: (_parsedResponse, rawResponse)=>getSummary(rawResponse)
11
+ },
12
+ coordinates: {
13
+ shape: 'point',
14
+ order: 'xy',
15
+ normalizedBy: 1
16
+ },
17
+ parseResponse: (rawResponse, { options })=>parseUiTarsPlanningResponse(rawResponse, options.context.shotSize, uiTarsModelVersion),
18
+ transformActions: (parsedPlanningResponse)=>transformUiTarsActions(parsedPlanningResponse),
19
+ shouldContinuePlanning: (_parsedResponse, actions)=>actions.every((action)=>'Finished' !== action.type),
20
+ buildResponseLog: (_parsedResponse, rawResponse)=>getSummary(rawResponse)
21
+ };
22
+ }
23
+ export { createUiTarsPlanner };
24
+
25
+ //# sourceMappingURL=planning.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-model/models/ui-tars/planning.mjs","sources":["../../../../../src/ai-model/models/ui-tars/planning.ts"],"sourcesContent":["import type { UITarsModelVersion } from '@aiscene/shared/env';\nimport type { CustomPlanningDefinition } from '../../model-adapter/custom-planning-types';\nimport { transformUiTarsActions } from './actions';\nimport {\n type UiTarsParsedPlanningResponse,\n parseUiTarsPlanningResponse,\n} from './parser';\nimport { getSummary, getUiTarsPlanningPrompt } from './prompt';\n\nexport function createUiTarsPlanner(\n uiTarsModelVersion: UITarsModelVersion,\n): CustomPlanningDefinition<UiTarsParsedPlanningResponse> {\n return {\n messages: {\n systemPromptPlacement: 'user-message',\n buildSystemPrompt: getUiTarsPlanningPrompt,\n buildUserInstruction: (instruction) =>\n `<user_instruction>${instruction}</user_instruction>`,\n buildAssistantContent: (_parsedResponse, rawResponse) =>\n getSummary(rawResponse),\n },\n coordinates: { shape: 'point', order: 'xy', normalizedBy: 1 },\n parseResponse: (rawResponse, { options }) => {\n return parseUiTarsPlanningResponse(\n rawResponse,\n options.context.shotSize,\n uiTarsModelVersion,\n );\n },\n transformActions: (parsedPlanningResponse) => {\n return transformUiTarsActions(parsedPlanningResponse);\n },\n shouldContinuePlanning: (_parsedResponse, actions) =>\n actions.every((action) => action.type !== 'Finished'),\n buildResponseLog: (_parsedResponse, rawResponse) => getSummary(rawResponse),\n };\n}\n"],"names":["createUiTarsPlanner","uiTarsModelVersion","getUiTarsPlanningPrompt","instruction","_parsedResponse","rawResponse","getSummary","options","parseUiTarsPlanningResponse","parsedPlanningResponse","transformUiTarsActions","actions","action"],"mappings":";;;AASO,SAASA,oBACdC,kBAAsC;IAEtC,OAAO;QACL,UAAU;YACR,uBAAuB;YACvB,mBAAmBC;YACnB,sBAAsB,CAACC,cACrB,CAAC,kBAAkB,EAAEA,YAAY,mBAAmB,CAAC;YACvD,uBAAuB,CAACC,iBAAiBC,cACvCC,WAAWD;QACf;QACA,aAAa;YAAE,OAAO;YAAS,OAAO;YAAM,cAAc;QAAE;QAC5D,eAAe,CAACA,aAAa,EAAEE,OAAO,EAAE,GAC/BC,4BACLH,aACAE,QAAQ,OAAO,CAAC,QAAQ,EACxBN;QAGJ,kBAAkB,CAACQ,yBACVC,uBAAuBD;QAEhC,wBAAwB,CAACL,iBAAiBO,UACxCA,QAAQ,KAAK,CAAC,CAACC,SAAWA,AAAgB,eAAhBA,OAAO,IAAI;QACvC,kBAAkB,CAACR,iBAAiBC,cAAgBC,WAAWD;IACjE;AACF"}
@@ -0,0 +1,36 @@
1
+ import { getPreferredLanguage } from "@aiscene/shared/env";
2
+ function getUiTarsPlanningPrompt() {
3
+ const preferredLanguage = getPreferredLanguage();
4
+ return `
5
+ You are a GUI agent. You are given a task and your action history, with screenshots. You need to perform the next action to complete the task.
6
+
7
+ ## Output Format
8
+ \`\`\`
9
+ Thought: ...
10
+ Action: ...
11
+ \`\`\`
12
+
13
+ ## Action Space
14
+
15
+ click(start_box='[x1, y1, x2, y2]')
16
+ left_double(start_box='[x1, y1, x2, y2]')
17
+ right_single(start_box='[x1, y1, x2, y2]')
18
+ drag(start_box='[x1, y1, x2, y2]', end_box='[x3, y3, x4, y4]')
19
+ hotkey(key='')
20
+ type(content='xxx') # Use escape characters \\', \\\", and \\n in content part to ensure we can parse the content in normal python string format. If you want to submit your input, use \\n at the end of content.
21
+ scroll(start_box='[x1, y1, x2, y2]', direction='down or up or right or left')
22
+ wait() #Sleep for 5s and take a screenshot to check for any changes.
23
+ finished(content='xxx') # Use escape characters \\', \\", and \\n in content part to ensure we can parse the content in normal python string format.
24
+
25
+
26
+ ## Note
27
+ - Use ${preferredLanguage} in \`Thought\` part.
28
+ - Write a small plan and finally summarize your next action (with its target element) in one sentence in \`Thought\` part.
29
+
30
+ ## User Instruction
31
+ `;
32
+ }
33
+ const getSummary = (prediction)=>prediction.replace(/Reflection:[\s\S]*?(?=Action_Summary:|Action:|$)/g, '').trim();
34
+ export { getSummary, getUiTarsPlanningPrompt };
35
+
36
+ //# sourceMappingURL=prompt.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-model/models/ui-tars/prompt.mjs","sources":["../../../../../src/ai-model/models/ui-tars/prompt.ts"],"sourcesContent":["import { getPreferredLanguage } from '@aiscene/shared/env';\n\nexport function getUiTarsPlanningPrompt(): string {\n const preferredLanguage = getPreferredLanguage();\n\n return `\nYou are a GUI agent. You are given a task and your action history, with screenshots. You need to perform the next action to complete the task. \n\n## Output Format\n\\`\\`\\`\nThought: ...\nAction: ...\n\\`\\`\\`\n\n## Action Space\n\nclick(start_box='[x1, y1, x2, y2]')\nleft_double(start_box='[x1, y1, x2, y2]')\nright_single(start_box='[x1, y1, x2, y2]')\ndrag(start_box='[x1, y1, x2, y2]', end_box='[x3, y3, x4, y4]')\nhotkey(key='')\ntype(content='xxx') # Use escape characters \\\\', \\\\\\\", and \\\\n in content part to ensure we can parse the content in normal python string format. If you want to submit your input, use \\\\n at the end of content. \nscroll(start_box='[x1, y1, x2, y2]', direction='down or up or right or left')\nwait() #Sleep for 5s and take a screenshot to check for any changes.\nfinished(content='xxx') # Use escape characters \\\\', \\\\\", and \\\\n in content part to ensure we can parse the content in normal python string format.\n\n\n## Note\n- Use ${preferredLanguage} in \\`Thought\\` part.\n- Write a small plan and finally summarize your next action (with its target element) in one sentence in \\`Thought\\` part.\n\n## User Instruction\n`;\n}\n\nexport const getSummary = (prediction: string) =>\n prediction\n .replace(/Reflection:[\\s\\S]*?(?=Action_Summary:|Action:|$)/g, '')\n .trim();\n"],"names":["getUiTarsPlanningPrompt","preferredLanguage","getPreferredLanguage","getSummary","prediction"],"mappings":";AAEO,SAASA;IACd,MAAMC,oBAAoBC;IAE1B,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;MAuBJ,EAAED,kBAAkB;;;;AAI1B,CAAC;AACD;AAEO,MAAME,aAAa,CAACC,aACzBA,WACG,OAAO,CAAC,qDAAqD,IAC7D,IAAI"}
@@ -0,0 +1,6 @@
1
+ function isLocateIntent(intent) {
2
+ return 'default' === intent;
3
+ }
4
+ export { isLocateIntent };
5
+
6
+ //# sourceMappingURL=intent.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-model/models/utils/intent.mjs","sources":["../../../../../src/ai-model/models/utils/intent.ts"],"sourcesContent":["import type { TIntent } from '@aiscene/shared/env';\n\nexport function isLocateIntent(intent?: TIntent): boolean {\n return intent === 'default';\n}\n"],"names":["isLocateIntent","intent"],"mappings":"AAEO,SAASA,eAAeC,MAAgB;IAC7C,OAAOA,AAAW,cAAXA;AACT"}
@@ -0,0 +1,3 @@
1
+ import { buildInsightSystemPrompt } from "./system-prompt.mjs";
2
+ import { buildTypeQueryDemandValue, extractDataQueryPrompt } from "./user-prompt.mjs";
3
+ export { buildInsightSystemPrompt, buildTypeQueryDemandValue, extractDataQueryPrompt };
@@ -0,0 +1,104 @@
1
+ import { getPreferredLanguage } from "@aiscene/shared/env";
2
+ function buildInsightContextPrompt({ screenshotIncluded, referenceImagesIncluded }) {
3
+ const contextPrompts = [
4
+ "The user will give you data requirements in <DATA_DEMAND>. You need to understand the user's requirements and extract the data satisfying the <DATA_DEMAND>."
5
+ ];
6
+ if (screenshotIncluded) contextPrompts.push('The user will provide a current screenshot to evaluate, and may provide its contents. Base your answer on the current screenshot and its contents when provided. Treat them as the primary source of truth for what is currently visible or true.');
7
+ else contextPrompts.push('The user will not provide a current screenshot. Use only the supplied page contents and other inputs, and do not infer unsupported visual details.');
8
+ if (referenceImagesIncluded) {
9
+ const referenceImagesPrompt = 'Reference images are supporting context only unless <DATA_DEMAND> explicitly asks for comparison, matching, or reasoning about them.';
10
+ contextPrompts.push(screenshotIncluded ? `${referenceImagesPrompt} Do not conclude that something exists in the current screenshot solely because it appears in a reference image; when they conflict, trust the current screenshot and its contents.` : `${referenceImagesPrompt} Do not treat reference images as direct evidence of the current state unless the demand explicitly asks you to use them that way.`);
11
+ }
12
+ return contextPrompts.join('\n\n');
13
+ }
14
+ function buildInsightSystemPrompt(options) {
15
+ const preferredLanguage = getPreferredLanguage();
16
+ const screenshotIncluded = options.screenshotIncluded ?? true;
17
+ const referenceImagesIncluded = options.referenceImagesIncluded ?? false;
18
+ const { responsePrefix, dataOutput } = options.insightProtocol;
19
+ const contextPrompt = buildInsightContextPrompt({
20
+ screenshotIncluded,
21
+ referenceImagesIncluded
22
+ });
23
+ return `
24
+ You are a versatile professional in software UI design and testing. Your outstanding contributions will impact the user experience of billions of users.
25
+
26
+ ${contextPrompt}
27
+
28
+ If a key specifies a JSON data type (such as Number, String, Boolean, Object, Array), ensure the returned value strictly matches that data type.
29
+
30
+ When DATA_DEMAND is a JSON object, the keys in your response must exactly match the keys in DATA_DEMAND. Do not rename, translate, or substitute any key.${dataOutput.rules ? `\n\n${dataOutput.rules}` : ''}
31
+
32
+
33
+ Return in the following XML format:
34
+ ${responsePrefix ? responsePrefix : ''}
35
+ <observation>brief evidence observed for the extraction, less than 300 words. Use ${preferredLanguage} in this field.</observation>
36
+ ${dataOutput.placeholder}
37
+ <errors>optional error messages as JSON array, e.g., ["error1", "error2"]</errors>
38
+
39
+ # Example 1
40
+ For example, if the DATA_DEMAND is:
41
+
42
+ <DATA_DEMAND>
43
+ {
44
+ "name": "name shows on the left panel, string",
45
+ "age": "age shows on the right panel, number",
46
+ "isAdmin": "if the user is admin, boolean"
47
+ }
48
+ </DATA_DEMAND>
49
+
50
+ By viewing the screenshot and page contents, you can extract the following data:
51
+
52
+ ${responsePrefix ? responsePrefix : ''}
53
+ <observation>According to the screenshot, i can see ...</observation>
54
+ ${dataOutput.buildExample(`{
55
+ "name": "John",
56
+ "age": 30,
57
+ "isAdmin": true
58
+ }`.trim())}
59
+
60
+ # Example 2
61
+ If the DATA_DEMAND is:
62
+
63
+ <DATA_DEMAND>
64
+ the todo items list, string[]
65
+ </DATA_DEMAND>
66
+
67
+ By viewing the screenshot and page contents, you can extract the following data:
68
+
69
+ ${responsePrefix ? responsePrefix : ''}
70
+ <observation>According to the screenshot, i can see ...</observation>
71
+ ${dataOutput.buildExample('["todo 1", "todo 2", "todo 3"]')}
72
+
73
+ # Example 3
74
+ If the DATA_DEMAND is:
75
+
76
+ <DATA_DEMAND>
77
+ the page title, string
78
+ </DATA_DEMAND>
79
+
80
+ By viewing the screenshot and page contents, you can extract the following data:
81
+
82
+ ${responsePrefix ? responsePrefix : ''}
83
+ <observation>According to the screenshot, i can see ...</observation>
84
+ ${dataOutput.buildExample('"todo list"')}
85
+
86
+ # Example 4
87
+ If the DATA_DEMAND is:
88
+
89
+ <DATA_DEMAND>
90
+ {
91
+ "StatementIsTruthy": "Boolean, is it currently the SMS page?"
92
+ }
93
+ </DATA_DEMAND>
94
+
95
+ By viewing the screenshot and page contents, you can extract the following data:
96
+
97
+ ${responsePrefix ? responsePrefix : ''}
98
+ <observation>According to the screenshot, i can see ...</observation>
99
+ ${dataOutput.buildExample('{ "StatementIsTruthy": true }')}
100
+ `;
101
+ }
102
+ export { buildInsightSystemPrompt };
103
+
104
+ //# sourceMappingURL=system-prompt.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-model/prompt/insight/system-prompt.mjs","sources":["../../../../../src/ai-model/prompt/insight/system-prompt.ts"],"sourcesContent":["import { getPreferredLanguage } from '@aiscene/shared/env';\nimport type { InsightProtocol } from '../../model-adapter/insight-protocol';\n\nfunction buildInsightContextPrompt({\n screenshotIncluded,\n referenceImagesIncluded,\n}: {\n screenshotIncluded: boolean;\n referenceImagesIncluded: boolean;\n}) {\n const contextPrompts = [\n \"The user will give you data requirements in <DATA_DEMAND>. You need to understand the user's requirements and extract the data satisfying the <DATA_DEMAND>.\",\n ];\n\n if (screenshotIncluded) {\n contextPrompts.push(\n 'The user will provide a current screenshot to evaluate, and may provide its contents. Base your answer on the current screenshot and its contents when provided. Treat them as the primary source of truth for what is currently visible or true.',\n );\n } else {\n contextPrompts.push(\n 'The user will not provide a current screenshot. Use only the supplied page contents and other inputs, and do not infer unsupported visual details.',\n );\n }\n\n if (referenceImagesIncluded) {\n const referenceImagesPrompt =\n 'Reference images are supporting context only unless <DATA_DEMAND> explicitly asks for comparison, matching, or reasoning about them.';\n contextPrompts.push(\n screenshotIncluded\n ? `${referenceImagesPrompt} Do not conclude that something exists in the current screenshot solely because it appears in a reference image; when they conflict, trust the current screenshot and its contents.`\n : `${referenceImagesPrompt} Do not treat reference images as direct evidence of the current state unless the demand explicitly asks you to use them that way.`,\n );\n }\n\n return contextPrompts.join('\\n\\n');\n}\n\nexport function buildInsightSystemPrompt(options: {\n screenshotIncluded?: boolean;\n referenceImagesIncluded?: boolean;\n insightProtocol: InsightProtocol;\n}) {\n const preferredLanguage = getPreferredLanguage();\n const screenshotIncluded = options.screenshotIncluded ?? true;\n const referenceImagesIncluded = options.referenceImagesIncluded ?? false;\n const { responsePrefix, dataOutput } = options.insightProtocol;\n\n const contextPrompt = buildInsightContextPrompt({\n screenshotIncluded,\n referenceImagesIncluded,\n });\n\n return `\nYou are a versatile professional in software UI design and testing. Your outstanding contributions will impact the user experience of billions of users.\n\n${contextPrompt}\n\nIf a key specifies a JSON data type (such as Number, String, Boolean, Object, Array), ensure the returned value strictly matches that data type.\n\nWhen DATA_DEMAND is a JSON object, the keys in your response must exactly match the keys in DATA_DEMAND. Do not rename, translate, or substitute any key.${dataOutput.rules ? `\\n\\n${dataOutput.rules}` : ''}\n\n\nReturn in the following XML format:\n${responsePrefix ? responsePrefix : ''}\n<observation>brief evidence observed for the extraction, less than 300 words. Use ${preferredLanguage} in this field.</observation>\n${dataOutput.placeholder}\n<errors>optional error messages as JSON array, e.g., [\"error1\", \"error2\"]</errors>\n\n# Example 1\nFor example, if the DATA_DEMAND is:\n\n<DATA_DEMAND>\n{\n \"name\": \"name shows on the left panel, string\",\n \"age\": \"age shows on the right panel, number\",\n \"isAdmin\": \"if the user is admin, boolean\"\n}\n</DATA_DEMAND>\n\nBy viewing the screenshot and page contents, you can extract the following data:\n\n${responsePrefix ? responsePrefix : ''}\n<observation>According to the screenshot, i can see ...</observation>\n${dataOutput.buildExample(\n `{\n \"name\": \"John\",\n \"age\": 30,\n \"isAdmin\": true\n}`.trim(),\n)}\n\n# Example 2\nIf the DATA_DEMAND is:\n\n<DATA_DEMAND>\nthe todo items list, string[]\n</DATA_DEMAND>\n\nBy viewing the screenshot and page contents, you can extract the following data:\n\n${responsePrefix ? responsePrefix : ''}\n<observation>According to the screenshot, i can see ...</observation>\n${dataOutput.buildExample('[\"todo 1\", \"todo 2\", \"todo 3\"]')}\n\n# Example 3\nIf the DATA_DEMAND is:\n\n<DATA_DEMAND>\nthe page title, string\n</DATA_DEMAND>\n\nBy viewing the screenshot and page contents, you can extract the following data:\n\n${responsePrefix ? responsePrefix : ''}\n<observation>According to the screenshot, i can see ...</observation>\n${dataOutput.buildExample('\"todo list\"')}\n\n# Example 4\nIf the DATA_DEMAND is:\n\n<DATA_DEMAND>\n{\n \"StatementIsTruthy\": \"Boolean, is it currently the SMS page?\"\n}\n</DATA_DEMAND>\n\nBy viewing the screenshot and page contents, you can extract the following data:\n\n${responsePrefix ? responsePrefix : ''}\n<observation>According to the screenshot, i can see ...</observation>\n${dataOutput.buildExample('{ \"StatementIsTruthy\": true }')}\n`;\n}\n"],"names":["buildInsightContextPrompt","screenshotIncluded","referenceImagesIncluded","contextPrompts","referenceImagesPrompt","buildInsightSystemPrompt","options","preferredLanguage","getPreferredLanguage","responsePrefix","dataOutput","contextPrompt"],"mappings":";AAGA,SAASA,0BAA0B,EACjCC,kBAAkB,EAClBC,uBAAuB,EAIxB;IACC,MAAMC,iBAAiB;QACrB;KACD;IAED,IAAIF,oBACFE,eAAe,IAAI,CACjB;SAGFA,eAAe,IAAI,CACjB;IAIJ,IAAID,yBAAyB;QAC3B,MAAME,wBACJ;QACFD,eAAe,IAAI,CACjBF,qBACI,GAAGG,sBAAsB,mLAAmL,CAAC,GAC7M,GAAGA,sBAAsB,kIAAkI,CAAC;IAEpK;IAEA,OAAOD,eAAe,IAAI,CAAC;AAC7B;AAEO,SAASE,yBAAyBC,OAIxC;IACC,MAAMC,oBAAoBC;IAC1B,MAAMP,qBAAqBK,QAAQ,kBAAkB,IAAI;IACzD,MAAMJ,0BAA0BI,QAAQ,uBAAuB,IAAI;IACnE,MAAM,EAAEG,cAAc,EAAEC,UAAU,EAAE,GAAGJ,QAAQ,eAAe;IAE9D,MAAMK,gBAAgBX,0BAA0B;QAC9CC;QACAC;IACF;IAEA,OAAO,CAAC;;;AAGV,EAAES,cAAc;;;;yJAIyI,EAAED,WAAW,KAAK,GAAG,CAAC,IAAI,EAAEA,WAAW,KAAK,EAAE,GAAG,GAAG;;;;AAI7M,EAAED,iBAAiBA,iBAAiB,GAAG;kFAC2C,EAAEF,kBAAkB;AACtG,EAAEG,WAAW,WAAW,CAAC;;;;;;;;;;;;;;;;AAgBzB,EAAED,iBAAiBA,iBAAiB,GAAG;;AAEvC,EAAEC,WAAW,YAAY,CACvB,CAAC;;;;CAIF,CAAC,CAAC,IAAI,IACL;;;;;;;;;;;AAWF,EAAED,iBAAiBA,iBAAiB,GAAG;;AAEvC,EAAEC,WAAW,YAAY,CAAC,kCAAkC;;;;;;;;;;;AAW5D,EAAED,iBAAiBA,iBAAiB,GAAG;;AAEvC,EAAEC,WAAW,YAAY,CAAC,eAAe;;;;;;;;;;;;;AAazC,EAAED,iBAAiBA,iBAAiB,GAAG;;AAEvC,EAAEC,WAAW,YAAY,CAAC,iCAAiC;AAC3D,CAAC;AACD"}
@@ -0,0 +1,23 @@
1
+ function buildTypeQueryDemandValue(type, demand) {
2
+ const currentScreenshotConstraint = 'based on the current screenshot and its contents if provided, unless the user explicitly asks to compare with reference images';
3
+ if ('Assert' === type) return `Boolean, ${currentScreenshotConstraint}, whether the following statement is true: ${demand}`;
4
+ if ('WaitFor' === type) return `Boolean, the user wants to do some 'wait for' operation. ${currentScreenshotConstraint}, please check whether the following statement is true: ${demand}`;
5
+ return `${type}, ${currentScreenshotConstraint}, ${demand}`;
6
+ }
7
+ const extractDataQueryPrompt = (pageDescription, dataQuery, context)=>{
8
+ const dataQueryText = 'string' == typeof dataQuery ? dataQuery : JSON.stringify(dataQuery, null, 2);
9
+ const trimmedContext = context?.trim();
10
+ const contextSection = trimmedContext ? `\n<CONTEXT>\n${trimmedContext}\n</CONTEXT>\n` : '';
11
+ return `
12
+ <PageDescription>
13
+ ${pageDescription}
14
+ </PageDescription>
15
+ ${contextSection}
16
+ <DATA_DEMAND>
17
+ ${dataQueryText}
18
+ </DATA_DEMAND>
19
+ `;
20
+ };
21
+ export { buildTypeQueryDemandValue, extractDataQueryPrompt };
22
+
23
+ //# sourceMappingURL=user-prompt.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-model/prompt/insight/user-prompt.mjs","sources":["../../../../../src/ai-model/prompt/insight/user-prompt.ts"],"sourcesContent":["import type { ServiceExtractParam } from '@/types';\n\nexport function buildTypeQueryDemandValue(\n type: 'Boolean' | 'Number' | 'String' | 'Assert' | 'WaitFor',\n demand: ServiceExtractParam,\n) {\n const currentScreenshotConstraint =\n 'based on the current screenshot and its contents if provided, unless the user explicitly asks to compare with reference images';\n\n if (type === 'Assert') {\n return `Boolean, ${currentScreenshotConstraint}, whether the following statement is true: ${demand}`;\n }\n\n if (type === 'WaitFor') {\n return `Boolean, the user wants to do some 'wait for' operation. ${currentScreenshotConstraint}, please check whether the following statement is true: ${demand}`;\n }\n\n return `${type}, ${currentScreenshotConstraint}, ${demand}`;\n}\n\nexport const extractDataQueryPrompt = (\n pageDescription: string,\n dataQuery: string | Record<string, string>,\n context?: string,\n) => {\n const dataQueryText =\n typeof dataQuery === 'string'\n ? dataQuery\n : JSON.stringify(dataQuery, null, 2);\n\n const trimmedContext = context?.trim();\n const contextSection = trimmedContext\n ? `\\n<CONTEXT>\\n${trimmedContext}\\n</CONTEXT>\\n`\n : '';\n\n return `\n<PageDescription>\n${pageDescription}\n</PageDescription>\n${contextSection}\n<DATA_DEMAND>\n${dataQueryText}\n</DATA_DEMAND>\n `;\n};\n"],"names":["buildTypeQueryDemandValue","type","demand","currentScreenshotConstraint","extractDataQueryPrompt","pageDescription","dataQuery","context","dataQueryText","JSON","trimmedContext","contextSection"],"mappings":"AAEO,SAASA,0BACdC,IAA4D,EAC5DC,MAA2B;IAE3B,MAAMC,8BACJ;IAEF,IAAIF,AAAS,aAATA,MACF,OAAO,CAAC,SAAS,EAAEE,4BAA4B,2CAA2C,EAAED,QAAQ;IAGtG,IAAID,AAAS,cAATA,MACF,OAAO,CAAC,yDAAyD,EAAEE,4BAA4B,wDAAwD,EAAED,QAAQ;IAGnK,OAAO,GAAGD,KAAK,EAAE,EAAEE,4BAA4B,EAAE,EAAED,QAAQ;AAC7D;AAEO,MAAME,yBAAyB,CACpCC,iBACAC,WACAC;IAEA,MAAMC,gBACJ,AAAqB,YAArB,OAAOF,YACHA,YACAG,KAAK,SAAS,CAACH,WAAW,MAAM;IAEtC,MAAMI,iBAAiBH,SAAS;IAChC,MAAMI,iBAAiBD,iBACnB,CAAC,aAAa,EAAEA,eAAe,cAAc,CAAC,GAC9C;IAEJ,OAAO,CAAC;;AAEV,EAAEL,gBAAgB;;AAElB,EAAEM,eAAe;;AAEjB,EAAEH,cAAc;;EAEd,CAAC;AACH"}
@@ -0,0 +1,12 @@
1
+ import { locateGroundingRules } from "./grounding-rules.mjs";
2
+ function buildElementLocateSystemPrompt({ systemPromptIntroduction, responseInstructions }) {
3
+ return `
4
+ ${systemPromptIntroduction}
5
+
6
+ ${locateGroundingRules()}
7
+
8
+ ${responseInstructions}`;
9
+ }
10
+ export { buildElementLocateSystemPrompt };
11
+
12
+ //# sourceMappingURL=element-system-prompt.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-model/prompt/locate/element-system-prompt.mjs","sources":["../../../../../src/ai-model/prompt/locate/element-system-prompt.ts"],"sourcesContent":["import { locateGroundingRules } from './grounding-rules';\n\nexport function buildElementLocateSystemPrompt({\n systemPromptIntroduction,\n responseInstructions,\n}: {\n systemPromptIntroduction: string;\n responseInstructions: string;\n}) {\n return `\n${systemPromptIntroduction}\n\n${locateGroundingRules()}\n\n${responseInstructions}`;\n}\n"],"names":["buildElementLocateSystemPrompt","systemPromptIntroduction","responseInstructions","locateGroundingRules"],"mappings":";AAEO,SAASA,+BAA+B,EAC7CC,wBAAwB,EACxBC,oBAAoB,EAIrB;IACC,OAAO,CAAC;AACV,EAAED,yBAAyB;;AAE3B,EAAEE,uBAAuB;;AAEzB,EAAED,sBAAsB;AACxB"}
@@ -0,0 +1,13 @@
1
+ function locateGroundingRules() {
2
+ return `## Important Notes for Locating Elements:
3
+ - First identify the target primitive from the user's description, then locate that primitive only. Treat labels, owners, rows, columns, and surrounding text as context unless the description says they are the target.
4
+ - If the target itself is visible text, link text, status text, table cell text, or header text, return only the tight visible text region, not the entire control, row, sentence, or container.
5
+ - If a text or link target wraps across multiple lines, do not return one large box covering the whole wrapped text. Return a tight box around a distinctive visible segment of the target text; for CJK link labels, the first 2-4 visible characters are enough when unique.
6
+ - If the target is an input/select/filter field body, current value area, or blank field region, return that field/control body or value region. Do not retarget to a trailing search icon, dropdown arrow, clear button, or nearby table header.
7
+ - If the target is an icon, arrow, checkbox, radio, or accessory control, return only that glyph/control region. Do not return adjacent owner text.
8
+ - If the target is a tiny icon/control among adjacent similar icons, use the described local order or relative position within that group and return only that glyph/control.
9
+ - If the same text appears in multiple regions, obey the described owner region first, such as filter bar vs table header.`;
10
+ }
11
+ export { locateGroundingRules };
12
+
13
+ //# sourceMappingURL=grounding-rules.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-model/prompt/locate/grounding-rules.mjs","sources":["../../../../../src/ai-model/prompt/locate/grounding-rules.ts"],"sourcesContent":["export function locateGroundingRules() {\n return `## Important Notes for Locating Elements:\n- First identify the target primitive from the user's description, then locate that primitive only. Treat labels, owners, rows, columns, and surrounding text as context unless the description says they are the target.\n- If the target itself is visible text, link text, status text, table cell text, or header text, return only the tight visible text region, not the entire control, row, sentence, or container.\n- If a text or link target wraps across multiple lines, do not return one large box covering the whole wrapped text. Return a tight box around a distinctive visible segment of the target text; for CJK link labels, the first 2-4 visible characters are enough when unique.\n- If the target is an input/select/filter field body, current value area, or blank field region, return that field/control body or value region. Do not retarget to a trailing search icon, dropdown arrow, clear button, or nearby table header.\n- If the target is an icon, arrow, checkbox, radio, or accessory control, return only that glyph/control region. Do not return adjacent owner text.\n- If the target is a tiny icon/control among adjacent similar icons, use the described local order or relative position within that group and return only that glyph/control.\n- If the same text appears in multiple regions, obey the described owner region first, such as filter bar vs table header.`;\n}\n"],"names":["locateGroundingRules"],"mappings":"AAAO,SAASA;IACd,OAAO,CAAC;;;;;;;0HAOgH,CAAC;AAC3H"}
@@ -0,0 +1,4 @@
1
+ import { buildElementLocateSystemPrompt } from "./element-system-prompt.mjs";
2
+ import { locateGroundingRules } from "./grounding-rules.mjs";
3
+ import { buildSearchAreaLocateSystemPrompt } from "./search-area-system-prompt.mjs";
4
+ export { buildElementLocateSystemPrompt, buildSearchAreaLocateSystemPrompt, locateGroundingRules };
@@ -0,0 +1,9 @@
1
+ function buildSearchAreaLocateSystemPrompt({ systemPromptIntroduction, responseInstructions }) {
2
+ return `
3
+ ${systemPromptIntroduction}
4
+
5
+ ${responseInstructions}`;
6
+ }
7
+ export { buildSearchAreaLocateSystemPrompt };
8
+
9
+ //# sourceMappingURL=search-area-system-prompt.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-model/prompt/locate/search-area-system-prompt.mjs","sources":["../../../../../src/ai-model/prompt/locate/search-area-system-prompt.ts"],"sourcesContent":["export function buildSearchAreaLocateSystemPrompt({\n systemPromptIntroduction,\n responseInstructions,\n}: {\n systemPromptIntroduction: string;\n responseInstructions: string;\n}) {\n return `\n${systemPromptIntroduction}\n\n${responseInstructions}`;\n}\n"],"names":["buildSearchAreaLocateSystemPrompt","systemPromptIntroduction","responseInstructions"],"mappings":"AAAO,SAASA,kCAAkC,EAChDC,wBAAwB,EACxBC,oBAAoB,EAIrB;IACC,OAAO,CAAC;AACV,EAAED,yBAAyB;;AAE3B,EAAEC,sBAAsB;AACxB"}
@@ -0,0 +1,52 @@
1
+ import { findAllMidsceneLocatorField } from "../../../common.mjs";
2
+ import { actionInputParamSchema, actionTapParamSchema } from "../../../device/index.mjs";
3
+ const injectLocateResultIntoSample = (sample, locateFields, promptSpec, locateResultExampleIndex)=>{
4
+ const result = {
5
+ ...sample
6
+ };
7
+ let exampleIndex = locateResultExampleIndex;
8
+ for (const field of locateFields)if (result[field] && 'object' == typeof result[field] && result[field].prompt) {
9
+ result[field] = {
10
+ ...result[field],
11
+ [promptSpec.resultKey]: promptSpec.exampleValues[exampleIndex % promptSpec.exampleValues.length]
12
+ };
13
+ exampleIndex++;
14
+ }
15
+ return result;
16
+ };
17
+ const buildActionOutputExample = (action, { locatePromptSpec, locateResultExampleIndex = 0, buildActionOutput })=>{
18
+ if (!action.sample || 'object' != typeof action.sample) return;
19
+ const locateFields = findAllMidsceneLocatorField(action.paramSchema);
20
+ const sampleWithLocateResult = locatePromptSpec ? injectLocateResultIntoSample(action.sample, locateFields, locatePromptSpec, locateResultExampleIndex) : action.sample;
21
+ return buildActionOutput({
22
+ actionName: action.name,
23
+ param: sampleWithLocateResult,
24
+ locateFields,
25
+ locateResultKey: locatePromptSpec?.resultKey
26
+ });
27
+ };
28
+ const createSampleTapAction = (prompt)=>{
29
+ const sample = {
30
+ locate: {
31
+ prompt
32
+ }
33
+ };
34
+ return {
35
+ name: 'Tap',
36
+ paramSchema: actionTapParamSchema,
37
+ sample
38
+ };
39
+ };
40
+ const createSampleInputAction = (value)=>{
41
+ const sample = {
42
+ value
43
+ };
44
+ return {
45
+ name: 'Input',
46
+ paramSchema: actionInputParamSchema,
47
+ sample
48
+ };
49
+ };
50
+ export { buildActionOutputExample, createSampleInputAction, createSampleTapAction };
51
+
52
+ //# sourceMappingURL=action-output-example.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-model/prompt/planning/action-output-example.mjs","sources":["../../../../../src/ai-model/prompt/planning/action-output-example.ts"],"sourcesContent":["import { findAllMidsceneLocatorField } from '@/common';\nimport { actionInputParamSchema, actionTapParamSchema } from '@/device';\nimport type { DeviceAction } from '@/types';\nimport type { z } from 'zod';\nimport type { PlanningActionOutputProtocol } from '../../model-adapter/planning-protocol';\nimport type { LocateResultPromptSpec } from '../../shared/model-locate-result';\n\nexport type ActionOutputExampleDefinition = Pick<\n DeviceAction<any>,\n 'name' | 'paramSchema' | 'sample'\n>;\n\nconst injectLocateResultIntoSample = (\n sample: Record<string, any>,\n locateFields: string[],\n promptSpec: LocateResultPromptSpec,\n locateResultExampleIndex: number,\n): Record<string, any> => {\n const result = { ...sample };\n let exampleIndex = locateResultExampleIndex;\n\n for (const field of locateFields) {\n if (\n result[field] &&\n typeof result[field] === 'object' &&\n result[field].prompt\n ) {\n result[field] = {\n ...result[field],\n [promptSpec.resultKey]:\n promptSpec.exampleValues[\n exampleIndex % promptSpec.exampleValues.length\n ],\n };\n exampleIndex++;\n }\n }\n\n return result;\n};\n\nexport const buildActionOutputExample = (\n action: ActionOutputExampleDefinition,\n {\n locatePromptSpec,\n locateResultExampleIndex = 0,\n buildActionOutput,\n }: {\n locatePromptSpec?: LocateResultPromptSpec;\n /**\n * Selects the locate result example value injected into this action.\n * Keep the same index for the same example across multi-turn prompt\n * variants, and use different indexes for different examples to avoid\n * reusing identical locate coordinates.\n */\n locateResultExampleIndex?: number;\n buildActionOutput: PlanningActionOutputProtocol['buildActionOutput'];\n },\n) => {\n if (!action.sample || typeof action.sample !== 'object') {\n return undefined;\n }\n\n const locateFields = findAllMidsceneLocatorField(action.paramSchema);\n const sampleWithLocateResult = locatePromptSpec\n ? injectLocateResultIntoSample(\n action.sample,\n locateFields,\n locatePromptSpec,\n locateResultExampleIndex,\n )\n : action.sample;\n\n return buildActionOutput({\n actionName: action.name,\n param: sampleWithLocateResult,\n locateFields,\n locateResultKey: locatePromptSpec?.resultKey,\n });\n};\n\nexport const createSampleTapAction = (\n prompt: string,\n): ActionOutputExampleDefinition => {\n const sample: z.input<typeof actionTapParamSchema> = {\n locate: { prompt },\n };\n return {\n name: 'Tap',\n paramSchema: actionTapParamSchema,\n sample,\n };\n};\n\nexport const createSampleInputAction = (\n value: string,\n): ActionOutputExampleDefinition => {\n const sample: z.input<typeof actionInputParamSchema> = { value };\n return {\n name: 'Input',\n paramSchema: actionInputParamSchema,\n sample,\n };\n};\n"],"names":["injectLocateResultIntoSample","sample","locateFields","promptSpec","locateResultExampleIndex","result","exampleIndex","field","buildActionOutputExample","action","locatePromptSpec","buildActionOutput","findAllMidsceneLocatorField","sampleWithLocateResult","createSampleTapAction","prompt","actionTapParamSchema","createSampleInputAction","value","actionInputParamSchema"],"mappings":";;AAYA,MAAMA,+BAA+B,CACnCC,QACAC,cACAC,YACAC;IAEA,MAAMC,SAAS;QAAE,GAAGJ,MAAM;IAAC;IAC3B,IAAIK,eAAeF;IAEnB,KAAK,MAAMG,SAASL,aAClB,IACEG,MAAM,CAACE,MAAM,IACb,AAAyB,YAAzB,OAAOF,MAAM,CAACE,MAAM,IACpBF,MAAM,CAACE,MAAM,CAAC,MAAM,EACpB;QACAF,MAAM,CAACE,MAAM,GAAG;YACd,GAAGF,MAAM,CAACE,MAAM;YAChB,CAACJ,WAAW,SAAS,CAAC,EACpBA,WAAW,aAAa,CACtBG,eAAeH,WAAW,aAAa,CAAC,MAAM,CAC/C;QACL;QACAG;IACF;IAGF,OAAOD;AACT;AAEO,MAAMG,2BAA2B,CACtCC,QACA,EACEC,gBAAgB,EAChBN,2BAA2B,CAAC,EAC5BO,iBAAiB,EAWlB;IAED,IAAI,CAACF,OAAO,MAAM,IAAI,AAAyB,YAAzB,OAAOA,OAAO,MAAM,EACxC;IAGF,MAAMP,eAAeU,4BAA4BH,OAAO,WAAW;IACnE,MAAMI,yBAAyBH,mBAC3BV,6BACES,OAAO,MAAM,EACbP,cACAQ,kBACAN,4BAEFK,OAAO,MAAM;IAEjB,OAAOE,kBAAkB;QACvB,YAAYF,OAAO,IAAI;QACvB,OAAOI;QACPX;QACA,iBAAiBQ,kBAAkB;IACrC;AACF;AAEO,MAAMI,wBAAwB,CACnCC;IAEA,MAAMd,SAA+C;QACnD,QAAQ;YAAEc;QAAO;IACnB;IACA,OAAO;QACL,MAAM;QACN,aAAaC;QACbf;IACF;AACF;AAEO,MAAMgB,0BAA0B,CACrCC;IAEA,MAAMjB,SAAiD;QAAEiB;IAAM;IAC/D,OAAO;QACL,MAAM;QACN,aAAaC;QACblB;IACF;AACF"}
@@ -0,0 +1,28 @@
1
+ import js_yaml from "js-yaml";
2
+ import { buildActionOutputExample } from "./action-output-example.mjs";
3
+ const serializeActionDescriptions = (actionDescriptions, format)=>{
4
+ if ('jsonl' === format) return actionDescriptions.map((description)=>JSON.stringify(description)).join('\n');
5
+ return js_yaml.dump(actionDescriptions, {
6
+ indent: 2,
7
+ lineWidth: -1,
8
+ noRefs: true
9
+ }).trim();
10
+ };
11
+ const buildPlanningActionSpaceDescription = ({ actionSpace, locatePromptSpec, planningProtocol })=>{
12
+ const locateFieldDescription = planningProtocol.actionSpaceProtocol.buildLocateFieldDescription(locatePromptSpec);
13
+ const actionDescriptions = actionSpace.map((action)=>{
14
+ const actionOutputExample = planningProtocol.actionSpaceProtocol.includeActionOutputExample ? buildActionOutputExample(action, {
15
+ locatePromptSpec,
16
+ buildActionOutput: planningProtocol.actionOutputProtocol.buildActionOutput
17
+ }) : void 0;
18
+ return planningProtocol.actionSpaceProtocol.buildActionDescription({
19
+ action,
20
+ locateFieldDescription,
21
+ actionOutputExample
22
+ });
23
+ });
24
+ return serializeActionDescriptions(actionDescriptions, planningProtocol.actionSpaceProtocol.format);
25
+ };
26
+ export { buildPlanningActionSpaceDescription, serializeActionDescriptions };
27
+
28
+ //# sourceMappingURL=action-space-description.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-model/prompt/planning/action-space-description.mjs","sources":["../../../../../src/ai-model/prompt/planning/action-space-description.ts"],"sourcesContent":["import type { DeviceAction } from '@/types';\nimport yaml from 'js-yaml';\nimport type {\n PlanningActionSpaceFormat,\n StandardPlanningProtocol,\n} from '../../model-adapter/planning-protocol';\nimport type { LocateResultPromptSpec } from '../../shared/model-locate-result';\nimport { buildActionOutputExample } from './action-output-example';\n\ntype BuildPlanningActionSpaceDescriptionInput = {\n actionSpace: DeviceAction<any>[];\n locatePromptSpec?: LocateResultPromptSpec;\n planningProtocol: StandardPlanningProtocol;\n};\n\nexport const serializeActionDescriptions = (\n actionDescriptions: unknown[],\n format: PlanningActionSpaceFormat,\n) => {\n if (format === 'jsonl') {\n return actionDescriptions\n .map((description) => JSON.stringify(description))\n .join('\\n');\n }\n\n return yaml\n .dump(actionDescriptions, {\n indent: 2,\n lineWidth: -1,\n noRefs: true,\n })\n .trim();\n};\n\nexport const buildPlanningActionSpaceDescription = ({\n actionSpace,\n locatePromptSpec,\n planningProtocol,\n}: BuildPlanningActionSpaceDescriptionInput) => {\n const locateFieldDescription =\n planningProtocol.actionSpaceProtocol.buildLocateFieldDescription(\n locatePromptSpec,\n );\n const actionDescriptions = actionSpace.map((action) => {\n const actionOutputExample = planningProtocol.actionSpaceProtocol\n .includeActionOutputExample\n ? buildActionOutputExample(action, {\n locatePromptSpec,\n buildActionOutput:\n planningProtocol.actionOutputProtocol.buildActionOutput,\n })\n : undefined;\n return planningProtocol.actionSpaceProtocol.buildActionDescription({\n action,\n locateFieldDescription,\n actionOutputExample,\n });\n });\n\n return serializeActionDescriptions(\n actionDescriptions,\n planningProtocol.actionSpaceProtocol.format,\n );\n};\n"],"names":["serializeActionDescriptions","actionDescriptions","format","description","JSON","yaml","buildPlanningActionSpaceDescription","actionSpace","locatePromptSpec","planningProtocol","locateFieldDescription","action","actionOutputExample","buildActionOutputExample","undefined"],"mappings":";;AAeO,MAAMA,8BAA8B,CACzCC,oBACAC;IAEA,IAAIA,AAAW,YAAXA,QACF,OAAOD,mBACJ,GAAG,CAAC,CAACE,cAAgBC,KAAK,SAAS,CAACD,cACpC,IAAI,CAAC;IAGV,OAAOE,QAAAA,IACA,CAACJ,oBAAoB;QACxB,QAAQ;QACR,WAAW;QACX,QAAQ;IACV,GACC,IAAI;AACT;AAEO,MAAMK,sCAAsC,CAAC,EAClDC,WAAW,EACXC,gBAAgB,EAChBC,gBAAgB,EACyB;IACzC,MAAMC,yBACJD,iBAAiB,mBAAmB,CAAC,2BAA2B,CAC9DD;IAEJ,MAAMP,qBAAqBM,YAAY,GAAG,CAAC,CAACI;QAC1C,MAAMC,sBAAsBH,iBAAiB,mBAAmB,CAC7D,0BAA0B,GACzBI,yBAAyBF,QAAQ;YAC/BH;YACA,mBACEC,iBAAiB,oBAAoB,CAAC,iBAAiB;QAC3D,KACAK;QACJ,OAAOL,iBAAiB,mBAAmB,CAAC,sBAAsB,CAAC;YACjEE;YACAD;YACAE;QACF;IACF;IAEA,OAAOZ,4BACLC,oBACAQ,iBAAiB,mBAAmB,CAAC,MAAM;AAE/C"}
@@ -0,0 +1,6 @@
1
+ import { buildStandardPlanningSystemPrompt } from "./system-prompt.mjs";
2
+ import { buildPlanningActionSpaceDescription, serializeActionDescriptions } from "./action-space-description.mjs";
3
+ import { buildActionOutputExample, createSampleInputAction, createSampleTapAction } from "./action-output-example.mjs";
4
+ import { buildPlanningResponseExample } from "./planning-response-example.mjs";
5
+ import { buildSubGoalsText } from "./sub-goals-text.mjs";
6
+ export { buildActionOutputExample, buildPlanningActionSpaceDescription, buildPlanningResponseExample, buildStandardPlanningSystemPrompt, buildSubGoalsText, createSampleInputAction, createSampleTapAction, serializeActionDescriptions };