@creatoria/miniapp-mcp 0.1.3 → 0.2.2

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 (414) hide show
  1. package/README.md +131 -66
  2. package/dist/app/cli/index.d.ts +6 -0
  3. package/dist/app/cli/index.d.ts.map +1 -0
  4. package/dist/app/cli/index.js +6 -0
  5. package/dist/app/cli/index.js.map +1 -0
  6. package/dist/app/index.d.ts +6 -0
  7. package/dist/app/index.d.ts.map +1 -0
  8. package/dist/app/index.js +6 -0
  9. package/dist/app/index.js.map +1 -0
  10. package/dist/app/server/index.d.ts +7 -0
  11. package/dist/app/server/index.d.ts.map +1 -0
  12. package/dist/app/server/index.js +6 -0
  13. package/dist/app/server/index.js.map +1 -0
  14. package/dist/capabilities/assert/handlers/assert-handlers.d.ts +98 -0
  15. package/dist/capabilities/assert/handlers/assert-handlers.d.ts.map +1 -0
  16. package/dist/capabilities/assert/handlers/assert-handlers.js +179 -0
  17. package/dist/capabilities/assert/handlers/assert-handlers.js.map +1 -0
  18. package/dist/capabilities/assert/handlers/index.d.ts +7 -0
  19. package/dist/capabilities/assert/handlers/index.d.ts.map +1 -0
  20. package/dist/capabilities/assert/handlers/index.js +7 -0
  21. package/dist/capabilities/assert/handlers/index.js.map +1 -0
  22. package/dist/capabilities/assert/index.d.ts +15 -0
  23. package/dist/capabilities/assert/index.d.ts.map +1 -0
  24. package/dist/capabilities/assert/index.js +90 -0
  25. package/dist/capabilities/assert/index.js.map +1 -0
  26. package/dist/capabilities/assert/schemas/index.d.ts +101 -0
  27. package/dist/capabilities/assert/schemas/index.d.ts.map +1 -0
  28. package/dist/capabilities/assert/schemas/index.js +62 -0
  29. package/dist/capabilities/assert/schemas/index.js.map +1 -0
  30. package/dist/capabilities/automator/handlers/close.d.ts +18 -0
  31. package/dist/capabilities/automator/handlers/close.d.ts.map +1 -0
  32. package/dist/capabilities/automator/handlers/close.js +45 -0
  33. package/dist/capabilities/automator/handlers/close.js.map +1 -0
  34. package/dist/capabilities/automator/handlers/connect.d.ts +24 -0
  35. package/dist/capabilities/automator/handlers/connect.d.ts.map +1 -0
  36. package/dist/capabilities/automator/handlers/connect.js +51 -0
  37. package/dist/capabilities/automator/handlers/connect.js.map +1 -0
  38. package/dist/capabilities/automator/handlers/disconnect.d.ts +16 -0
  39. package/dist/capabilities/automator/handlers/disconnect.d.ts.map +1 -0
  40. package/dist/capabilities/automator/handlers/disconnect.js +44 -0
  41. package/dist/capabilities/automator/handlers/disconnect.js.map +1 -0
  42. package/dist/capabilities/automator/handlers/index.d.ts +8 -0
  43. package/dist/capabilities/automator/handlers/index.d.ts.map +1 -0
  44. package/dist/capabilities/automator/handlers/index.js +8 -0
  45. package/dist/capabilities/automator/handlers/index.js.map +1 -0
  46. package/dist/capabilities/automator/handlers/launch.d.ts +25 -0
  47. package/dist/capabilities/automator/handlers/launch.d.ts.map +1 -0
  48. package/dist/capabilities/automator/handlers/launch.js +61 -0
  49. package/dist/capabilities/automator/handlers/launch.js.map +1 -0
  50. package/dist/capabilities/automator/index.d.ts +15 -0
  51. package/dist/capabilities/automator/index.d.ts.map +1 -0
  52. package/dist/capabilities/automator/index.js +55 -0
  53. package/dist/capabilities/automator/index.js.map +1 -0
  54. package/dist/capabilities/automator/schemas/close.d.ts +5 -0
  55. package/dist/capabilities/automator/schemas/close.d.ts.map +1 -0
  56. package/dist/capabilities/automator/schemas/close.js +11 -0
  57. package/dist/capabilities/automator/schemas/close.js.map +1 -0
  58. package/dist/capabilities/automator/schemas/connect.d.ts +11 -0
  59. package/dist/capabilities/automator/schemas/connect.d.ts.map +1 -0
  60. package/dist/capabilities/automator/schemas/connect.js +19 -0
  61. package/dist/capabilities/automator/schemas/connect.js.map +1 -0
  62. package/dist/capabilities/automator/schemas/disconnect.d.ts +5 -0
  63. package/dist/capabilities/automator/schemas/disconnect.d.ts.map +1 -0
  64. package/dist/capabilities/automator/schemas/disconnect.js +11 -0
  65. package/dist/capabilities/automator/schemas/disconnect.js.map +1 -0
  66. package/dist/capabilities/automator/schemas/index.d.ts +9 -0
  67. package/dist/capabilities/automator/schemas/index.d.ts.map +1 -0
  68. package/dist/capabilities/automator/schemas/index.js +14 -0
  69. package/dist/capabilities/automator/schemas/index.js.map +1 -0
  70. package/dist/capabilities/automator/schemas/launch.d.ts +17 -0
  71. package/dist/capabilities/automator/schemas/launch.d.ts.map +1 -0
  72. package/dist/capabilities/automator/schemas/launch.js +26 -0
  73. package/dist/capabilities/automator/schemas/launch.js.map +1 -0
  74. package/dist/capabilities/element/handlers/element-handlers.d.ts +212 -0
  75. package/dist/capabilities/element/handlers/element-handlers.d.ts.map +1 -0
  76. package/dist/capabilities/element/handlers/element-handlers.js +383 -0
  77. package/dist/capabilities/element/handlers/element-handlers.js.map +1 -0
  78. package/dist/capabilities/element/handlers/index.d.ts +7 -0
  79. package/dist/capabilities/element/handlers/index.d.ts.map +1 -0
  80. package/dist/capabilities/element/handlers/index.js +27 -0
  81. package/dist/capabilities/element/handlers/index.js.map +1 -0
  82. package/dist/capabilities/element/index.d.ts +20 -0
  83. package/dist/capabilities/element/index.d.ts.map +1 -0
  84. package/dist/capabilities/element/index.js +199 -0
  85. package/dist/capabilities/element/index.js.map +1 -0
  86. package/dist/capabilities/element/schemas/index.d.ts +325 -0
  87. package/dist/capabilities/element/schemas/index.d.ts.map +1 -0
  88. package/dist/capabilities/element/schemas/index.js +168 -0
  89. package/dist/capabilities/element/schemas/index.js.map +1 -0
  90. package/dist/capabilities/index.d.ts +34 -0
  91. package/dist/capabilities/index.d.ts.map +1 -0
  92. package/dist/capabilities/index.js +40 -0
  93. package/dist/capabilities/index.js.map +1 -0
  94. package/dist/capabilities/loader.d.ts +61 -0
  95. package/dist/capabilities/loader.d.ts.map +1 -0
  96. package/dist/capabilities/loader.js +164 -0
  97. package/dist/capabilities/loader.js.map +1 -0
  98. package/dist/capabilities/miniprogram/handlers/call-wx.d.ts +24 -0
  99. package/dist/capabilities/miniprogram/handlers/call-wx.d.ts.map +1 -0
  100. package/dist/capabilities/miniprogram/handlers/call-wx.js +37 -0
  101. package/dist/capabilities/miniprogram/handlers/call-wx.js.map +1 -0
  102. package/dist/capabilities/miniprogram/handlers/evaluate.d.ts +32 -0
  103. package/dist/capabilities/miniprogram/handlers/evaluate.d.ts.map +1 -0
  104. package/dist/capabilities/miniprogram/handlers/evaluate.js +51 -0
  105. package/dist/capabilities/miniprogram/handlers/evaluate.js.map +1 -0
  106. package/dist/capabilities/miniprogram/handlers/index.d.ts +12 -0
  107. package/dist/capabilities/miniprogram/handlers/index.d.ts.map +1 -0
  108. package/dist/capabilities/miniprogram/handlers/index.js +12 -0
  109. package/dist/capabilities/miniprogram/handlers/index.js.map +1 -0
  110. package/dist/capabilities/miniprogram/handlers/navigate.d.ts +26 -0
  111. package/dist/capabilities/miniprogram/handlers/navigate.d.ts.map +1 -0
  112. package/dist/capabilities/miniprogram/handlers/navigate.js +56 -0
  113. package/dist/capabilities/miniprogram/handlers/navigate.js.map +1 -0
  114. package/dist/capabilities/miniprogram/handlers/page-stack.d.ts +20 -0
  115. package/dist/capabilities/miniprogram/handlers/page-stack.d.ts.map +1 -0
  116. package/dist/capabilities/miniprogram/handlers/page-stack.js +37 -0
  117. package/dist/capabilities/miniprogram/handlers/page-stack.js.map +1 -0
  118. package/dist/capabilities/miniprogram/handlers/screenshot.d.ts +33 -0
  119. package/dist/capabilities/miniprogram/handlers/screenshot.d.ts.map +1 -0
  120. package/dist/capabilities/miniprogram/handlers/screenshot.js +132 -0
  121. package/dist/capabilities/miniprogram/handlers/screenshot.js.map +1 -0
  122. package/dist/capabilities/miniprogram/handlers/system-info.d.ts +17 -0
  123. package/dist/capabilities/miniprogram/handlers/system-info.d.ts.map +1 -0
  124. package/dist/capabilities/miniprogram/handlers/system-info.js +31 -0
  125. package/dist/capabilities/miniprogram/handlers/system-info.js.map +1 -0
  126. package/dist/capabilities/miniprogram/index.d.ts +15 -0
  127. package/dist/capabilities/miniprogram/index.d.ts.map +1 -0
  128. package/dist/capabilities/miniprogram/index.js +69 -0
  129. package/dist/capabilities/miniprogram/index.js.map +1 -0
  130. package/dist/capabilities/miniprogram/schemas/call-wx.d.ts +15 -0
  131. package/dist/capabilities/miniprogram/schemas/call-wx.d.ts.map +1 -0
  132. package/dist/capabilities/miniprogram/schemas/call-wx.js +11 -0
  133. package/dist/capabilities/miniprogram/schemas/call-wx.js.map +1 -0
  134. package/dist/capabilities/miniprogram/schemas/evaluate.d.ts +15 -0
  135. package/dist/capabilities/miniprogram/schemas/evaluate.d.ts.map +1 -0
  136. package/dist/capabilities/miniprogram/schemas/evaluate.js +11 -0
  137. package/dist/capabilities/miniprogram/schemas/evaluate.js.map +1 -0
  138. package/dist/capabilities/miniprogram/schemas/index.d.ts +10 -0
  139. package/dist/capabilities/miniprogram/schemas/index.d.ts.map +1 -0
  140. package/dist/capabilities/miniprogram/schemas/index.js +10 -0
  141. package/dist/capabilities/miniprogram/schemas/index.js.map +1 -0
  142. package/dist/capabilities/miniprogram/schemas/navigate.d.ts +18 -0
  143. package/dist/capabilities/miniprogram/schemas/navigate.d.ts.map +1 -0
  144. package/dist/capabilities/miniprogram/schemas/navigate.js +22 -0
  145. package/dist/capabilities/miniprogram/schemas/navigate.js.map +1 -0
  146. package/dist/capabilities/miniprogram/schemas/page-stack.d.ts +6 -0
  147. package/dist/capabilities/miniprogram/schemas/page-stack.d.ts.map +1 -0
  148. package/dist/capabilities/miniprogram/schemas/page-stack.js +6 -0
  149. package/dist/capabilities/miniprogram/schemas/page-stack.js.map +1 -0
  150. package/dist/capabilities/miniprogram/schemas/screenshot.d.ts +18 -0
  151. package/dist/capabilities/miniprogram/schemas/screenshot.d.ts.map +1 -0
  152. package/dist/capabilities/miniprogram/schemas/screenshot.js +21 -0
  153. package/dist/capabilities/miniprogram/schemas/screenshot.js.map +1 -0
  154. package/dist/capabilities/miniprogram/schemas/system-info.d.ts +6 -0
  155. package/dist/capabilities/miniprogram/schemas/system-info.d.ts.map +1 -0
  156. package/dist/capabilities/miniprogram/schemas/system-info.js +6 -0
  157. package/dist/capabilities/miniprogram/schemas/system-info.js.map +1 -0
  158. package/dist/capabilities/network/handlers/index.d.ts +7 -0
  159. package/dist/capabilities/network/handlers/index.d.ts.map +1 -0
  160. package/dist/capabilities/network/handlers/index.js +7 -0
  161. package/dist/capabilities/network/handlers/index.js.map +1 -0
  162. package/dist/capabilities/network/handlers/network-handlers.d.ts +53 -0
  163. package/dist/capabilities/network/handlers/network-handlers.d.ts.map +1 -0
  164. package/dist/capabilities/network/handlers/network-handlers.js +127 -0
  165. package/dist/capabilities/network/handlers/network-handlers.js.map +1 -0
  166. package/dist/capabilities/network/index.d.ts +15 -0
  167. package/dist/capabilities/network/index.d.ts.map +1 -0
  168. package/dist/capabilities/network/index.js +69 -0
  169. package/dist/capabilities/network/index.js.map +1 -0
  170. package/dist/capabilities/network/schemas/index.d.ts +53 -0
  171. package/dist/capabilities/network/schemas/index.d.ts.map +1 -0
  172. package/dist/capabilities/network/schemas/index.js +33 -0
  173. package/dist/capabilities/network/schemas/index.js.map +1 -0
  174. package/dist/capabilities/page/handlers/index.d.ts +7 -0
  175. package/dist/capabilities/page/handlers/index.d.ts.map +1 -0
  176. package/dist/capabilities/page/handlers/index.js +7 -0
  177. package/dist/capabilities/page/handlers/index.js.map +1 -0
  178. package/dist/capabilities/page/handlers/page-handlers.d.ts +165 -0
  179. package/dist/capabilities/page/handlers/page-handlers.d.ts.map +1 -0
  180. package/dist/capabilities/page/handlers/page-handlers.js +258 -0
  181. package/dist/capabilities/page/handlers/page-handlers.js.map +1 -0
  182. package/dist/capabilities/page/index.d.ts +15 -0
  183. package/dist/capabilities/page/index.d.ts.map +1 -0
  184. package/dist/capabilities/page/index.js +83 -0
  185. package/dist/capabilities/page/index.js.map +1 -0
  186. package/dist/capabilities/page/schemas/index.d.ts +91 -0
  187. package/dist/capabilities/page/schemas/index.d.ts.map +1 -0
  188. package/dist/capabilities/page/schemas/index.js +55 -0
  189. package/dist/capabilities/page/schemas/index.js.map +1 -0
  190. package/dist/capabilities/record/handlers/index.d.ts +7 -0
  191. package/dist/capabilities/record/handlers/index.d.ts.map +1 -0
  192. package/dist/capabilities/record/handlers/index.js +7 -0
  193. package/dist/capabilities/record/handlers/index.js.map +1 -0
  194. package/dist/capabilities/record/handlers/record-handlers.d.ts +76 -0
  195. package/dist/capabilities/record/handlers/record-handlers.d.ts.map +1 -0
  196. package/dist/capabilities/record/handlers/record-handlers.js +255 -0
  197. package/dist/capabilities/record/handlers/record-handlers.js.map +1 -0
  198. package/dist/capabilities/record/index.d.ts +15 -0
  199. package/dist/capabilities/record/index.d.ts.map +1 -0
  200. package/dist/capabilities/record/index.js +69 -0
  201. package/dist/capabilities/record/index.js.map +1 -0
  202. package/dist/capabilities/record/schemas/index.d.ts +47 -0
  203. package/dist/capabilities/record/schemas/index.d.ts.map +1 -0
  204. package/dist/capabilities/record/schemas/index.js +33 -0
  205. package/dist/capabilities/record/schemas/index.js.map +1 -0
  206. package/dist/capabilities/registry.d.ts +138 -0
  207. package/dist/capabilities/registry.d.ts.map +1 -0
  208. package/dist/capabilities/registry.js +261 -0
  209. package/dist/capabilities/registry.js.map +1 -0
  210. package/dist/capabilities/schema-registry.d.ts +4 -0
  211. package/dist/capabilities/schema-registry.d.ts.map +1 -0
  212. package/dist/capabilities/schema-registry.js +18 -0
  213. package/dist/capabilities/schema-registry.js.map +1 -0
  214. package/dist/capabilities/schema-types.d.ts +22 -0
  215. package/dist/capabilities/schema-types.d.ts.map +1 -0
  216. package/dist/capabilities/schema-types.js +2 -0
  217. package/dist/capabilities/schema-types.js.map +1 -0
  218. package/dist/capabilities/snapshot/handlers/index.d.ts +7 -0
  219. package/dist/capabilities/snapshot/handlers/index.d.ts.map +1 -0
  220. package/dist/capabilities/snapshot/handlers/index.js +7 -0
  221. package/dist/capabilities/snapshot/handlers/index.js.map +1 -0
  222. package/dist/capabilities/snapshot/handlers/snapshot-handlers.d.ts +75 -0
  223. package/dist/capabilities/snapshot/handlers/snapshot-handlers.d.ts.map +1 -0
  224. package/dist/capabilities/snapshot/handlers/snapshot-handlers.js +201 -0
  225. package/dist/capabilities/snapshot/handlers/snapshot-handlers.js.map +1 -0
  226. package/dist/capabilities/snapshot/index.d.ts +15 -0
  227. package/dist/capabilities/snapshot/index.d.ts.map +1 -0
  228. package/dist/capabilities/snapshot/index.js +48 -0
  229. package/dist/capabilities/snapshot/index.js.map +1 -0
  230. package/dist/capabilities/snapshot/schemas/index.d.ts +47 -0
  231. package/dist/capabilities/snapshot/schemas/index.d.ts.map +1 -0
  232. package/dist/capabilities/snapshot/schemas/index.js +28 -0
  233. package/dist/capabilities/snapshot/schemas/index.js.map +1 -0
  234. package/dist/config/loader.js +1 -1
  235. package/dist/config/loader.js.map +1 -1
  236. package/dist/core/element-ref.d.ts +1 -43
  237. package/dist/core/element-ref.d.ts.map +1 -1
  238. package/dist/core/element-ref.js +1 -212
  239. package/dist/core/element-ref.js.map +1 -1
  240. package/dist/core/logger.d.ts +1 -54
  241. package/dist/core/logger.d.ts.map +1 -1
  242. package/dist/core/logger.js +1 -377
  243. package/dist/core/logger.js.map +1 -1
  244. package/dist/core/output.d.ts +1 -20
  245. package/dist/core/output.d.ts.map +1 -1
  246. package/dist/core/output.js +1 -55
  247. package/dist/core/output.js.map +1 -1
  248. package/dist/core/report-generator.d.ts +1 -23
  249. package/dist/core/report-generator.d.ts.map +1 -1
  250. package/dist/core/report-generator.js +1 -211
  251. package/dist/core/report-generator.js.map +1 -1
  252. package/dist/core/session.d.ts +2 -82
  253. package/dist/core/session.d.ts.map +1 -1
  254. package/dist/core/session.js +2 -305
  255. package/dist/core/session.js.map +1 -1
  256. package/dist/core/timeout.d.ts +1 -48
  257. package/dist/core/timeout.d.ts.map +1 -1
  258. package/dist/core/timeout.js +1 -66
  259. package/dist/core/timeout.js.map +1 -1
  260. package/dist/core/tool-logger.d.ts +1 -82
  261. package/dist/core/tool-logger.d.ts.map +1 -1
  262. package/dist/core/tool-logger.js +1 -452
  263. package/dist/core/tool-logger.js.map +1 -1
  264. package/dist/core/validation.d.ts +1 -38
  265. package/dist/core/validation.d.ts.map +1 -1
  266. package/dist/core/validation.js +1 -92
  267. package/dist/core/validation.js.map +1 -1
  268. package/dist/runtime/element/element-ref.d.ts +44 -0
  269. package/dist/runtime/element/element-ref.d.ts.map +1 -0
  270. package/dist/runtime/element/element-ref.js +214 -0
  271. package/dist/runtime/element/element-ref.js.map +1 -0
  272. package/dist/runtime/element/index.d.ts +2 -0
  273. package/dist/runtime/element/index.d.ts.map +1 -0
  274. package/dist/runtime/element/index.js +2 -0
  275. package/dist/runtime/element/index.js.map +1 -0
  276. package/dist/runtime/index.d.ts +11 -0
  277. package/dist/runtime/index.d.ts.map +1 -0
  278. package/dist/runtime/index.js +11 -0
  279. package/dist/runtime/index.js.map +1 -0
  280. package/dist/runtime/logging/index.d.ts +3 -0
  281. package/dist/runtime/logging/index.d.ts.map +1 -0
  282. package/dist/runtime/logging/index.js +3 -0
  283. package/dist/runtime/logging/index.js.map +1 -0
  284. package/dist/runtime/logging/logger.d.ts +55 -0
  285. package/dist/runtime/logging/logger.d.ts.map +1 -0
  286. package/dist/runtime/logging/logger.js +379 -0
  287. package/dist/runtime/logging/logger.js.map +1 -0
  288. package/dist/runtime/logging/tool-logger.d.ts +83 -0
  289. package/dist/runtime/logging/tool-logger.d.ts.map +1 -0
  290. package/dist/runtime/logging/tool-logger.js +454 -0
  291. package/dist/runtime/logging/tool-logger.js.map +1 -0
  292. package/dist/runtime/outputs/index.d.ts +3 -0
  293. package/dist/runtime/outputs/index.d.ts.map +1 -0
  294. package/dist/runtime/outputs/index.js +3 -0
  295. package/dist/runtime/outputs/index.js.map +1 -0
  296. package/dist/runtime/outputs/output-manager.d.ts +12 -0
  297. package/dist/runtime/outputs/output-manager.d.ts.map +1 -0
  298. package/dist/runtime/outputs/output-manager.js +39 -0
  299. package/dist/runtime/outputs/output-manager.js.map +1 -0
  300. package/dist/runtime/outputs/report-generator.d.ts +5 -0
  301. package/dist/runtime/outputs/report-generator.d.ts.map +1 -0
  302. package/dist/runtime/outputs/report-generator.js +175 -0
  303. package/dist/runtime/outputs/report-generator.js.map +1 -0
  304. package/dist/runtime/retry/index.d.ts +5 -0
  305. package/dist/runtime/retry/index.d.ts.map +1 -0
  306. package/dist/runtime/retry/index.js +5 -0
  307. package/dist/runtime/retry/index.js.map +1 -0
  308. package/dist/runtime/retry/retry.d.ts +61 -0
  309. package/dist/runtime/retry/retry.d.ts.map +1 -0
  310. package/dist/runtime/retry/retry.js +90 -0
  311. package/dist/runtime/retry/retry.js.map +1 -0
  312. package/dist/runtime/session/index.d.ts +3 -0
  313. package/dist/runtime/session/index.d.ts.map +1 -0
  314. package/dist/runtime/session/index.js +3 -0
  315. package/dist/runtime/session/index.js.map +1 -0
  316. package/dist/runtime/session/store.d.ts +28 -0
  317. package/dist/runtime/session/store.d.ts.map +1 -0
  318. package/dist/runtime/session/store.js +154 -0
  319. package/dist/runtime/session/store.js.map +1 -0
  320. package/dist/runtime/session/utils/cleanup.d.ts +3 -0
  321. package/dist/runtime/session/utils/cleanup.d.ts.map +1 -0
  322. package/dist/runtime/session/utils/cleanup.js +78 -0
  323. package/dist/runtime/session/utils/cleanup.js.map +1 -0
  324. package/dist/runtime/timeout/index.d.ts +2 -0
  325. package/dist/runtime/timeout/index.d.ts.map +1 -0
  326. package/dist/runtime/timeout/index.js +2 -0
  327. package/dist/runtime/timeout/index.js.map +1 -0
  328. package/dist/runtime/timeout/timeout.d.ts +59 -0
  329. package/dist/runtime/timeout/timeout.d.ts.map +1 -0
  330. package/dist/runtime/timeout/timeout.js +77 -0
  331. package/dist/runtime/timeout/timeout.js.map +1 -0
  332. package/dist/runtime/validation/index.d.ts +2 -0
  333. package/dist/runtime/validation/index.d.ts.map +1 -0
  334. package/dist/runtime/validation/index.js +2 -0
  335. package/dist/runtime/validation/index.js.map +1 -0
  336. package/dist/runtime/validation/validation.d.ts +39 -0
  337. package/dist/runtime/validation/validation.d.ts.map +1 -0
  338. package/dist/runtime/validation/validation.js +93 -0
  339. package/dist/runtime/validation/validation.js.map +1 -0
  340. package/dist/schemas/automator/miniprogram_close.json +12 -0
  341. package/dist/schemas/automator/miniprogram_connect.json +19 -0
  342. package/dist/schemas/automator/miniprogram_disconnect.json +12 -0
  343. package/dist/schemas/automator/miniprogram_launch.json +30 -0
  344. package/dist/server.js +5 -5
  345. package/dist/server.js.map +1 -1
  346. package/dist/tools/index.d.ts.map +1 -1
  347. package/dist/tools/index.js +8 -4
  348. package/dist/tools/index.js.map +1 -1
  349. package/dist/tools/miniprogram.d.ts +11 -2
  350. package/dist/tools/miniprogram.d.ts.map +1 -1
  351. package/dist/tools/miniprogram.js +111 -41
  352. package/dist/tools/miniprogram.js.map +1 -1
  353. package/dist/tools/page.js +2 -2
  354. package/dist/tools/page.js.map +1 -1
  355. package/docs/current/01-architecture-migration.md +337 -0
  356. package/docs/current/02-screenshot-timeout-fix.md +589 -0
  357. package/docs/current/README.md +226 -0
  358. package/docs/directory-structure-and-code-style-best-practices.md +91 -0
  359. package/docs/migration/README.md +34 -0
  360. package/docs/migration/TC-ALIGN-01-notes.md +35 -0
  361. package/docs/migration/runtime-skeleton.md +50 -0
  362. package/docs/migration/tool-schema-strategy.md +75 -0
  363. package/docs//345/256/214/346/225/264/345/256/236/347/216/260/346/226/271/346/241/210.md +14 -14
  364. package/docs//347/254/254/344/270/200/347/211/210/346/234/254/346/226/271/346/241/210.md +7 -7
  365. package/package.json +4 -2
  366. package/docs/SIMPLE_USAGE.md +0 -210
  367. package/docs/architecture.E-Docs.md +0 -1359
  368. package/docs/architecture.F1.md +0 -720
  369. package/docs/architecture.F2.md +0 -871
  370. package/docs/architecture.F3.md +0 -905
  371. package/docs/architecture.md +0 -90
  372. package/docs/charter.A1.align.yaml +0 -170
  373. package/docs/charter.A2.align.yaml +0 -199
  374. package/docs/charter.A3.align.yaml +0 -242
  375. package/docs/charter.A4.align.yaml +0 -227
  376. package/docs/charter.B1.align.yaml +0 -179
  377. package/docs/charter.B2.align.yaml +0 -200
  378. package/docs/charter.B3.align.yaml +0 -200
  379. package/docs/charter.B4.align.yaml +0 -188
  380. package/docs/charter.C1.align.yaml +0 -190
  381. package/docs/charter.C2.align.yaml +0 -202
  382. package/docs/charter.C3.align.yaml +0 -211
  383. package/docs/charter.C4.align.yaml +0 -263
  384. package/docs/charter.C5.align.yaml +0 -220
  385. package/docs/charter.D1.align.yaml +0 -190
  386. package/docs/charter.D2.align.yaml +0 -234
  387. package/docs/charter.D3.align.yaml +0 -206
  388. package/docs/charter.E-Docs.align.yaml +0 -294
  389. package/docs/charter.F1.align.yaml +0 -193
  390. package/docs/charter.F2.align.yaml +0 -248
  391. package/docs/charter.F3.align.yaml +0 -287
  392. package/docs/charter.G.align.yaml +0 -174
  393. package/docs/charter.align.yaml +0 -111
  394. package/docs/maintenance.md +0 -682
  395. package/docs/playwright-mcp/350/260/203/347/240/224.md +0 -53
  396. package/docs/setup-guide.md +0 -775
  397. package/docs/tasks.A1.atomize.md +0 -296
  398. package/docs/tasks.A2.atomize.md +0 -408
  399. package/docs/tasks.A3.atomize.md +0 -564
  400. package/docs/tasks.A4.atomize.md +0 -496
  401. package/docs/tasks.B1.atomize.md +0 -352
  402. package/docs/tasks.B2.atomize.md +0 -561
  403. package/docs/tasks.B3.atomize.md +0 -508
  404. package/docs/tasks.B4.atomize.md +0 -504
  405. package/docs/tasks.C1.atomize.md +0 -540
  406. package/docs/tasks.C2.atomize.md +0 -665
  407. package/docs/tasks.C3.atomize.md +0 -745
  408. package/docs/tasks.C4.atomize.md +0 -908
  409. package/docs/tasks.C5.atomize.md +0 -755
  410. package/docs/tasks.D1.atomize.md +0 -547
  411. package/docs/tasks.D2.atomize.md +0 -619
  412. package/docs/tasks.D3.atomize.md +0 -790
  413. package/docs/tasks.E-Docs.atomize.md +0 -1204
  414. package/docs/tasks.atomize.md +0 -189
@@ -0,0 +1,199 @@
1
+ /**
2
+ * Element Capability Module
3
+ *
4
+ * Provides tools for element-level interactions including:
5
+ * - Basic interactions (tap, longpress, input)
6
+ * - Properties and attributes
7
+ * - Events and gestures
8
+ * - ScrollView operations
9
+ * - Specialized component operations (Swiper, MovableView, Slider)
10
+ * - Custom element operations
11
+ */
12
+ import { tapSchema, longpressSchema, inputSchema, getTextSchema, getAttributeSchema, getPropertySchema, getValueSchema, getSizeSchema, getOffsetSchema, triggerSchema, getStyleSchema, touchstartSchema, touchmoveSchema, touchendSchema, scrollToSchema, scrollWidthSchema, scrollHeightSchema, swipeToSchema, moveToSchema, slideToSchema, callContextMethodSchema, setDataSchema, callMethodSchema, } from './schemas/index.js';
13
+ import { tap, longpress, input, getText, getAttribute, getProperty, getValue, getSize, getOffset, trigger, getStyle, touchstart, touchmove, touchend, scrollTo, scrollWidth, scrollHeight, swipeTo, moveTo, slideTo, callContextMethod, setData, callMethod, } from './handlers/index.js';
14
+ // Re-export schemas for external use
15
+ export * from './schemas/index.js';
16
+ // Re-export handlers for external use
17
+ export * from './handlers/index.js';
18
+ /**
19
+ * Element tool definitions - 23 tools
20
+ */
21
+ const tools = [
22
+ // Basic Interactions
23
+ {
24
+ name: 'element_tap',
25
+ description: 'Tap (click) an element',
26
+ capability: 'element',
27
+ inputSchema: tapSchema,
28
+ handler: tap,
29
+ },
30
+ {
31
+ name: 'element_longpress',
32
+ description: 'Long press an element',
33
+ capability: 'element',
34
+ inputSchema: longpressSchema,
35
+ handler: longpress,
36
+ },
37
+ {
38
+ name: 'element_input',
39
+ description: 'Input text into an element (input/textarea only)',
40
+ capability: 'element',
41
+ inputSchema: inputSchema,
42
+ handler: input,
43
+ },
44
+ // Properties and Attributes
45
+ {
46
+ name: 'element_get_text',
47
+ description: 'Get element text content',
48
+ capability: 'element',
49
+ inputSchema: getTextSchema,
50
+ handler: getText,
51
+ },
52
+ {
53
+ name: 'element_get_attribute',
54
+ description: 'Get element attribute (特性)',
55
+ capability: 'element',
56
+ inputSchema: getAttributeSchema,
57
+ handler: getAttribute,
58
+ },
59
+ {
60
+ name: 'element_get_property',
61
+ description: 'Get element property (属性)',
62
+ capability: 'element',
63
+ inputSchema: getPropertySchema,
64
+ handler: getProperty,
65
+ },
66
+ {
67
+ name: 'element_get_value',
68
+ description: 'Get element value',
69
+ capability: 'element',
70
+ inputSchema: getValueSchema,
71
+ handler: getValue,
72
+ },
73
+ {
74
+ name: 'element_get_size',
75
+ description: 'Get element size (width, height)',
76
+ capability: 'element',
77
+ inputSchema: getSizeSchema,
78
+ handler: getSize,
79
+ },
80
+ {
81
+ name: 'element_get_offset',
82
+ description: 'Get element offset (position)',
83
+ capability: 'element',
84
+ inputSchema: getOffsetSchema,
85
+ handler: getOffset,
86
+ },
87
+ {
88
+ name: 'element_get_style',
89
+ description: 'Get element style value',
90
+ capability: 'element',
91
+ inputSchema: getStyleSchema,
92
+ handler: getStyle,
93
+ },
94
+ // Events
95
+ {
96
+ name: 'element_trigger',
97
+ description: 'Trigger an event on the element',
98
+ capability: 'element',
99
+ inputSchema: triggerSchema,
100
+ handler: trigger,
101
+ },
102
+ {
103
+ name: 'element_touchstart',
104
+ description: 'Touch start on element',
105
+ capability: 'element',
106
+ inputSchema: touchstartSchema,
107
+ handler: touchstart,
108
+ },
109
+ {
110
+ name: 'element_touchmove',
111
+ description: 'Touch move on element',
112
+ capability: 'element',
113
+ inputSchema: touchmoveSchema,
114
+ handler: touchmove,
115
+ },
116
+ {
117
+ name: 'element_touchend',
118
+ description: 'Touch end on element',
119
+ capability: 'element',
120
+ inputSchema: touchendSchema,
121
+ handler: touchend,
122
+ },
123
+ // ScrollView Operations
124
+ {
125
+ name: 'element_scroll_to',
126
+ description: 'Scroll to position (ScrollView only)',
127
+ capability: 'element',
128
+ inputSchema: scrollToSchema,
129
+ handler: scrollTo,
130
+ },
131
+ {
132
+ name: 'element_scroll_width',
133
+ description: 'Get scroll width (ScrollView only)',
134
+ capability: 'element',
135
+ inputSchema: scrollWidthSchema,
136
+ handler: scrollWidth,
137
+ },
138
+ {
139
+ name: 'element_scroll_height',
140
+ description: 'Get scroll height (ScrollView only)',
141
+ capability: 'element',
142
+ inputSchema: scrollHeightSchema,
143
+ handler: scrollHeight,
144
+ },
145
+ // Specialized Component Operations
146
+ {
147
+ name: 'element_swipe_to',
148
+ description: 'Swipe to index (Swiper only)',
149
+ capability: 'element',
150
+ inputSchema: swipeToSchema,
151
+ handler: swipeTo,
152
+ },
153
+ {
154
+ name: 'element_move_to',
155
+ description: 'Move to position (MovableView only)',
156
+ capability: 'element',
157
+ inputSchema: moveToSchema,
158
+ handler: moveTo,
159
+ },
160
+ {
161
+ name: 'element_slide_to',
162
+ description: 'Slide to value (Slider only)',
163
+ capability: 'element',
164
+ inputSchema: slideToSchema,
165
+ handler: slideTo,
166
+ },
167
+ {
168
+ name: 'element_call_context_method',
169
+ description: 'Call context method (ContextElement only)',
170
+ capability: 'element',
171
+ inputSchema: callContextMethodSchema,
172
+ handler: callContextMethod,
173
+ },
174
+ // Custom Element Operations
175
+ {
176
+ name: 'element_set_data',
177
+ description: 'Set data on custom element (CustomElement only)',
178
+ capability: 'element',
179
+ inputSchema: setDataSchema,
180
+ handler: setData,
181
+ },
182
+ {
183
+ name: 'element_call_method',
184
+ description: 'Call method on custom element (CustomElement only)',
185
+ capability: 'element',
186
+ inputSchema: callMethodSchema,
187
+ handler: callMethod,
188
+ },
189
+ ];
190
+ /**
191
+ * Element capability module
192
+ */
193
+ export const capability = {
194
+ name: 'element',
195
+ description: 'Element-level interactions and properties (23 tools)',
196
+ tools,
197
+ };
198
+ export default capability;
199
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/capabilities/element/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EACL,SAAS,EACT,eAAe,EACf,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,eAAe,EACf,aAAa,EACb,cAAc,EACd,gBA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QACE,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,oDAAoD;QACjE,UAAU,EAAE,SAAS;QACrB,WAAW,EAAE,gBAAgB;QAC7B,OAAO,EAAE,UAAU;KACpB;CACF,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAqB;IAC1C,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,sDAAsD;IACnE,KAAK;CACN,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -0,0 +1,325 @@
1
+ /**
2
+ * Element schemas exports - 23 element tool schemas
3
+ */
4
+ import { z } from 'zod';
5
+ export declare const tapSchema: z.ZodObject<{
6
+ refId: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ refId: string;
9
+ }, {
10
+ refId: string;
11
+ }>;
12
+ export declare const longpressSchema: z.ZodObject<{
13
+ refId: z.ZodString;
14
+ }, "strip", z.ZodTypeAny, {
15
+ refId: string;
16
+ }, {
17
+ refId: string;
18
+ }>;
19
+ export declare const inputSchema: z.ZodObject<{
20
+ refId: z.ZodString;
21
+ value: z.ZodString;
22
+ }, "strip", z.ZodTypeAny, {
23
+ refId: string;
24
+ value: string;
25
+ }, {
26
+ refId: string;
27
+ value: string;
28
+ }>;
29
+ export declare const getTextSchema: z.ZodObject<{
30
+ refId: z.ZodString;
31
+ }, "strip", z.ZodTypeAny, {
32
+ refId: string;
33
+ }, {
34
+ refId: string;
35
+ }>;
36
+ export declare const getAttributeSchema: z.ZodObject<{
37
+ refId: z.ZodString;
38
+ name: z.ZodString;
39
+ }, "strip", z.ZodTypeAny, {
40
+ refId: string;
41
+ name: string;
42
+ }, {
43
+ refId: string;
44
+ name: string;
45
+ }>;
46
+ export declare const getPropertySchema: z.ZodObject<{
47
+ refId: z.ZodString;
48
+ name: z.ZodString;
49
+ }, "strip", z.ZodTypeAny, {
50
+ refId: string;
51
+ name: string;
52
+ }, {
53
+ refId: string;
54
+ name: string;
55
+ }>;
56
+ export declare const getValueSchema: z.ZodObject<{
57
+ refId: z.ZodString;
58
+ }, "strip", z.ZodTypeAny, {
59
+ refId: string;
60
+ }, {
61
+ refId: string;
62
+ }>;
63
+ export declare const getSizeSchema: z.ZodObject<{
64
+ refId: z.ZodString;
65
+ }, "strip", z.ZodTypeAny, {
66
+ refId: string;
67
+ }, {
68
+ refId: string;
69
+ }>;
70
+ export declare const getOffsetSchema: z.ZodObject<{
71
+ refId: z.ZodString;
72
+ }, "strip", z.ZodTypeAny, {
73
+ refId: string;
74
+ }, {
75
+ refId: string;
76
+ }>;
77
+ export declare const getStyleSchema: z.ZodObject<{
78
+ refId: z.ZodString;
79
+ name: z.ZodString;
80
+ }, "strip", z.ZodTypeAny, {
81
+ refId: string;
82
+ name: string;
83
+ }, {
84
+ refId: string;
85
+ name: string;
86
+ }>;
87
+ export declare const triggerSchema: z.ZodObject<{
88
+ refId: z.ZodString;
89
+ type: z.ZodString;
90
+ detail: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
91
+ }, "strip", z.ZodTypeAny, {
92
+ refId: string;
93
+ type: string;
94
+ detail?: Record<string, any> | undefined;
95
+ }, {
96
+ refId: string;
97
+ type: string;
98
+ detail?: Record<string, any> | undefined;
99
+ }>;
100
+ export declare const touchstartSchema: z.ZodObject<{
101
+ refId: z.ZodString;
102
+ touches: z.ZodArray<z.ZodObject<{
103
+ x: z.ZodNumber;
104
+ y: z.ZodNumber;
105
+ }, "strip", z.ZodTypeAny, {
106
+ x: number;
107
+ y: number;
108
+ }, {
109
+ x: number;
110
+ y: number;
111
+ }>, "many">;
112
+ changedTouches: z.ZodArray<z.ZodObject<{
113
+ x: z.ZodNumber;
114
+ y: z.ZodNumber;
115
+ }, "strip", z.ZodTypeAny, {
116
+ x: number;
117
+ y: number;
118
+ }, {
119
+ x: number;
120
+ y: number;
121
+ }>, "many">;
122
+ }, "strip", z.ZodTypeAny, {
123
+ refId: string;
124
+ touches: {
125
+ x: number;
126
+ y: number;
127
+ }[];
128
+ changedTouches: {
129
+ x: number;
130
+ y: number;
131
+ }[];
132
+ }, {
133
+ refId: string;
134
+ touches: {
135
+ x: number;
136
+ y: number;
137
+ }[];
138
+ changedTouches: {
139
+ x: number;
140
+ y: number;
141
+ }[];
142
+ }>;
143
+ export declare const touchmoveSchema: z.ZodObject<{
144
+ refId: z.ZodString;
145
+ touches: z.ZodArray<z.ZodObject<{
146
+ x: z.ZodNumber;
147
+ y: z.ZodNumber;
148
+ }, "strip", z.ZodTypeAny, {
149
+ x: number;
150
+ y: number;
151
+ }, {
152
+ x: number;
153
+ y: number;
154
+ }>, "many">;
155
+ changedTouches: z.ZodArray<z.ZodObject<{
156
+ x: z.ZodNumber;
157
+ y: z.ZodNumber;
158
+ }, "strip", z.ZodTypeAny, {
159
+ x: number;
160
+ y: number;
161
+ }, {
162
+ x: number;
163
+ y: number;
164
+ }>, "many">;
165
+ }, "strip", z.ZodTypeAny, {
166
+ refId: string;
167
+ touches: {
168
+ x: number;
169
+ y: number;
170
+ }[];
171
+ changedTouches: {
172
+ x: number;
173
+ y: number;
174
+ }[];
175
+ }, {
176
+ refId: string;
177
+ touches: {
178
+ x: number;
179
+ y: number;
180
+ }[];
181
+ changedTouches: {
182
+ x: number;
183
+ y: number;
184
+ }[];
185
+ }>;
186
+ export declare const touchendSchema: z.ZodObject<{
187
+ refId: z.ZodString;
188
+ touches: z.ZodArray<z.ZodObject<{
189
+ x: z.ZodNumber;
190
+ y: z.ZodNumber;
191
+ }, "strip", z.ZodTypeAny, {
192
+ x: number;
193
+ y: number;
194
+ }, {
195
+ x: number;
196
+ y: number;
197
+ }>, "many">;
198
+ changedTouches: z.ZodArray<z.ZodObject<{
199
+ x: z.ZodNumber;
200
+ y: z.ZodNumber;
201
+ }, "strip", z.ZodTypeAny, {
202
+ x: number;
203
+ y: number;
204
+ }, {
205
+ x: number;
206
+ y: number;
207
+ }>, "many">;
208
+ }, "strip", z.ZodTypeAny, {
209
+ refId: string;
210
+ touches: {
211
+ x: number;
212
+ y: number;
213
+ }[];
214
+ changedTouches: {
215
+ x: number;
216
+ y: number;
217
+ }[];
218
+ }, {
219
+ refId: string;
220
+ touches: {
221
+ x: number;
222
+ y: number;
223
+ }[];
224
+ changedTouches: {
225
+ x: number;
226
+ y: number;
227
+ }[];
228
+ }>;
229
+ export declare const scrollToSchema: z.ZodObject<{
230
+ refId: z.ZodString;
231
+ x: z.ZodNumber;
232
+ y: z.ZodNumber;
233
+ }, "strip", z.ZodTypeAny, {
234
+ refId: string;
235
+ x: number;
236
+ y: number;
237
+ }, {
238
+ refId: string;
239
+ x: number;
240
+ y: number;
241
+ }>;
242
+ export declare const scrollWidthSchema: z.ZodObject<{
243
+ refId: z.ZodString;
244
+ }, "strip", z.ZodTypeAny, {
245
+ refId: string;
246
+ }, {
247
+ refId: string;
248
+ }>;
249
+ export declare const scrollHeightSchema: z.ZodObject<{
250
+ refId: z.ZodString;
251
+ }, "strip", z.ZodTypeAny, {
252
+ refId: string;
253
+ }, {
254
+ refId: string;
255
+ }>;
256
+ export declare const swipeToSchema: z.ZodObject<{
257
+ refId: z.ZodString;
258
+ index: z.ZodNumber;
259
+ }, "strip", z.ZodTypeAny, {
260
+ refId: string;
261
+ index: number;
262
+ }, {
263
+ refId: string;
264
+ index: number;
265
+ }>;
266
+ export declare const moveToSchema: z.ZodObject<{
267
+ refId: z.ZodString;
268
+ x: z.ZodNumber;
269
+ y: z.ZodNumber;
270
+ }, "strip", z.ZodTypeAny, {
271
+ refId: string;
272
+ x: number;
273
+ y: number;
274
+ }, {
275
+ refId: string;
276
+ x: number;
277
+ y: number;
278
+ }>;
279
+ export declare const slideToSchema: z.ZodObject<{
280
+ refId: z.ZodString;
281
+ value: z.ZodNumber;
282
+ }, "strip", z.ZodTypeAny, {
283
+ refId: string;
284
+ value: number;
285
+ }, {
286
+ refId: string;
287
+ value: number;
288
+ }>;
289
+ export declare const callContextMethodSchema: z.ZodObject<{
290
+ refId: z.ZodString;
291
+ method: z.ZodString;
292
+ args: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
293
+ }, "strip", z.ZodTypeAny, {
294
+ method: string;
295
+ refId: string;
296
+ args?: any[] | undefined;
297
+ }, {
298
+ method: string;
299
+ refId: string;
300
+ args?: any[] | undefined;
301
+ }>;
302
+ export declare const setDataSchema: z.ZodObject<{
303
+ refId: z.ZodString;
304
+ data: z.ZodRecord<z.ZodString, z.ZodAny>;
305
+ }, "strip", z.ZodTypeAny, {
306
+ refId: string;
307
+ data: Record<string, any>;
308
+ }, {
309
+ refId: string;
310
+ data: Record<string, any>;
311
+ }>;
312
+ export declare const callMethodSchema: z.ZodObject<{
313
+ refId: z.ZodString;
314
+ method: z.ZodString;
315
+ args: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
316
+ }, "strip", z.ZodTypeAny, {
317
+ method: string;
318
+ refId: string;
319
+ args?: any[] | undefined;
320
+ }, {
321
+ method: string;
322
+ refId: string;
323
+ args?: any[] | undefined;
324
+ }>;
325
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/element/schemas/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAevB,eAAO,MAAM,SAAS;;;;;;EAIe,CAAA;AAErC,eAAO,MAAM,eAAe;;;;;;EAIQ,CAAA;AAEpC,eAAO,MAAM,WAAW;;;;;;;;;EAKuC,CAAA;AAM/D,eAAO,MAAM,aAAa;;;;;;EAIa,CAAA;AAEvC,eAAO,MAAM,kBAAkB;;;;;;;;;EAKU,CAAA;AAEzC,eAAO,MAAM,iBAAiB;;;;;;;;;EAKU,CAAA;AAExC,eAAO,MAAM,cAAc;;;;;;EAIK,CAAA;AAEhC,eAAO,MAAM,aAAa;;;;;;EAIqB,CAAA;AAE/C,eAAO,MAAM,eAAe;;;;;;EAIgB,CAAA;AAE5C,eAAO,MAAM,cAAc;;;;;;;;;EAKW,CAAA;AAMtC,eAAO,MAAM,aAAa;;;;;;;;;;;;EAMoB,CAAA;AAE9C,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMQ,CAAA;AAErC,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMQ,CAAA;AAEpC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMQ,CAAA;AAMnC,eAAO,MAAM,cAAc;;;;;;;;;;;;EAMwB,CAAA;AAEnD,eAAO,MAAM,iBAAiB;;;;;;EAImB,CAAA;AAEjD,eAAO,MAAM,kBAAkB;;;;;;EAImB,CAAA;AAMlD,eAAO,MAAM,aAAa;;;;;;;;;EAKiB,CAAA;AAE3C,eAAO,MAAM,YAAY;;;;;;;;;;;;EAMyB,CAAA;AAElD,eAAO,MAAM,aAAa;;;;;;;;;EAKiB,CAAA;AAE3C,eAAO,MAAM,uBAAuB;;;;;;;;;;;;EAMoB,CAAA;AAMxD,eAAO,MAAM,aAAa;;;;;;;;;EAKoC,CAAA;AAE9D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAMoC,CAAA"}
@@ -0,0 +1,168 @@
1
+ /**
2
+ * Element schemas exports - 23 element tool schemas
3
+ */
4
+ import { z } from 'zod';
5
+ // Common refId schema
6
+ const refIdSchema = z.string().min(1).describe('Element reference ID from page_query');
7
+ // Touch point schema
8
+ const touchPointSchema = z.object({
9
+ x: z.number().describe('X coordinate'),
10
+ y: z.number().describe('Y coordinate'),
11
+ });
12
+ // ============================================================================
13
+ // Basic Interactions
14
+ // ============================================================================
15
+ export const tapSchema = z
16
+ .object({
17
+ refId: refIdSchema,
18
+ })
19
+ .describe('Tap (click) an element');
20
+ export const longpressSchema = z
21
+ .object({
22
+ refId: refIdSchema,
23
+ })
24
+ .describe('Long press an element');
25
+ export const inputSchema = z
26
+ .object({
27
+ refId: refIdSchema,
28
+ value: z.string().describe('Text value to input'),
29
+ })
30
+ .describe('Input text into an element (input/textarea only)');
31
+ // ============================================================================
32
+ // Properties and Attributes
33
+ // ============================================================================
34
+ export const getTextSchema = z
35
+ .object({
36
+ refId: refIdSchema,
37
+ })
38
+ .describe('Get element text content');
39
+ export const getAttributeSchema = z
40
+ .object({
41
+ refId: refIdSchema,
42
+ name: z.string().min(1).describe('Attribute name to retrieve'),
43
+ })
44
+ .describe('Get element attribute (特性)');
45
+ export const getPropertySchema = z
46
+ .object({
47
+ refId: refIdSchema,
48
+ name: z.string().min(1).describe('Property name to retrieve'),
49
+ })
50
+ .describe('Get element property (属性)');
51
+ export const getValueSchema = z
52
+ .object({
53
+ refId: refIdSchema,
54
+ })
55
+ .describe('Get element value');
56
+ export const getSizeSchema = z
57
+ .object({
58
+ refId: refIdSchema,
59
+ })
60
+ .describe('Get element size (width, height)');
61
+ export const getOffsetSchema = z
62
+ .object({
63
+ refId: refIdSchema,
64
+ })
65
+ .describe('Get element offset (position)');
66
+ export const getStyleSchema = z
67
+ .object({
68
+ refId: refIdSchema,
69
+ name: z.string().min(1).describe('Style property name to retrieve'),
70
+ })
71
+ .describe('Get element style value');
72
+ // ============================================================================
73
+ // Events
74
+ // ============================================================================
75
+ export const triggerSchema = z
76
+ .object({
77
+ refId: refIdSchema,
78
+ type: z.string().min(1).describe('Event type to trigger'),
79
+ detail: z.record(z.any()).optional().describe('Event detail data (optional)'),
80
+ })
81
+ .describe('Trigger an event on the element');
82
+ export const touchstartSchema = z
83
+ .object({
84
+ refId: refIdSchema,
85
+ touches: z.array(touchPointSchema).describe('Touch points currently on screen'),
86
+ changedTouches: z.array(touchPointSchema).describe('Changed touch points'),
87
+ })
88
+ .describe('Touch start on element');
89
+ export const touchmoveSchema = z
90
+ .object({
91
+ refId: refIdSchema,
92
+ touches: z.array(touchPointSchema).describe('Touch points currently on screen'),
93
+ changedTouches: z.array(touchPointSchema).describe('Changed touch points'),
94
+ })
95
+ .describe('Touch move on element');
96
+ export const touchendSchema = z
97
+ .object({
98
+ refId: refIdSchema,
99
+ touches: z.array(touchPointSchema).describe('Touch points currently on screen'),
100
+ changedTouches: z.array(touchPointSchema).describe('Changed touch points'),
101
+ })
102
+ .describe('Touch end on element');
103
+ // ============================================================================
104
+ // ScrollView Operations
105
+ // ============================================================================
106
+ export const scrollToSchema = z
107
+ .object({
108
+ refId: refIdSchema,
109
+ x: z.number().describe('X coordinate'),
110
+ y: z.number().describe('Y coordinate'),
111
+ })
112
+ .describe('Scroll to position (ScrollView only)');
113
+ export const scrollWidthSchema = z
114
+ .object({
115
+ refId: refIdSchema,
116
+ })
117
+ .describe('Get scroll width (ScrollView only)');
118
+ export const scrollHeightSchema = z
119
+ .object({
120
+ refId: refIdSchema,
121
+ })
122
+ .describe('Get scroll height (ScrollView only)');
123
+ // ============================================================================
124
+ // Specialized Component Operations
125
+ // ============================================================================
126
+ export const swipeToSchema = z
127
+ .object({
128
+ refId: refIdSchema,
129
+ index: z.number().int().min(0).describe('Target swiper index'),
130
+ })
131
+ .describe('Swipe to index (Swiper only)');
132
+ export const moveToSchema = z
133
+ .object({
134
+ refId: refIdSchema,
135
+ x: z.number().describe('X coordinate'),
136
+ y: z.number().describe('Y coordinate'),
137
+ })
138
+ .describe('Move to position (MovableView only)');
139
+ export const slideToSchema = z
140
+ .object({
141
+ refId: refIdSchema,
142
+ value: z.number().describe('Target slider value'),
143
+ })
144
+ .describe('Slide to value (Slider only)');
145
+ export const callContextMethodSchema = z
146
+ .object({
147
+ refId: refIdSchema,
148
+ method: z.string().min(1).describe('Context method name'),
149
+ args: z.array(z.any()).optional().describe('Arguments to pass to the method'),
150
+ })
151
+ .describe('Call context method (ContextElement only)');
152
+ // ============================================================================
153
+ // Custom Element Operations
154
+ // ============================================================================
155
+ export const setDataSchema = z
156
+ .object({
157
+ refId: refIdSchema,
158
+ data: z.record(z.any()).describe('Data object to set'),
159
+ })
160
+ .describe('Set data on custom element (CustomElement only)');
161
+ export const callMethodSchema = z
162
+ .object({
163
+ refId: refIdSchema,
164
+ method: z.string().min(1).describe('Method name'),
165
+ args: z.array(z.any()).optional().describe('Arguments to pass to the method'),
166
+ })
167
+ .describe('Call method on custom element (CustomElement only)');
168
+ //# sourceMappingURL=index.js.map