ok-script 2.0.14__tar.gz → 2.0.15__tar.gz

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 (416) hide show
  1. ok_script-2.0.15/.agents/skills/develop/SKILL.md +55 -0
  2. ok_script-2.0.15/.agents/skills/develop/agents/openai.yaml +4 -0
  3. ok_script-2.0.15/.agents/skills/develop/references/windows-input.md +89 -0
  4. ok_script-2.0.15/.agents/skills/generate-templates/SKILL.md +185 -0
  5. ok_script-2.0.15/.agents/skills/reload-tasks/SKILL.md +28 -0
  6. ok_script-2.0.15/.agents/skills/reload-tasks/agents/openai.yaml +4 -0
  7. ok_script-2.0.15/.agents/skills/setup-env/SKILL.md +36 -0
  8. ok_script-2.0.15/.agents/skills/setup-env/agents/openai.yaml +4 -0
  9. ok_script-2.0.15/.agents/skills/setup-project/SKILL.md +69 -0
  10. ok_script-2.0.15/.agents/skills/setup-project/agents/openai.yaml +4 -0
  11. ok_script-2.0.15/.agents/skills/use_venv/SKILL.md +31 -0
  12. ok_script-2.0.15/.agents/skills/write-test/SKILL.md +67 -0
  13. ok_script-2.0.15/.agents/skills/write-test/agents/openai.yaml +3 -0
  14. {ok_script-2.0.14 → ok_script-2.0.15}/MANIFEST.in +3 -0
  15. {ok_script-2.0.14/ok_script.egg-info → ok_script-2.0.15}/PKG-INFO +10 -14
  16. {ok_script-2.0.14 → ok_script-2.0.15}/README.md +7 -9
  17. ok_script-2.0.15/docs/mcp.md +271 -0
  18. ok_script-2.0.15/examples/mcp_observe.py +30 -0
  19. {ok_script-2.0.14 → ok_script-2.0.15}/ok/__init__.py +59 -42
  20. {ok_script-2.0.14 → ok_script-2.0.15}/ok/cli.py +25 -9
  21. {ok_script-2.0.14 → ok_script-2.0.15}/ok/core/capture_labels.py +1 -1
  22. ok_script-2.0.15/ok/core/code_runner.py +257 -0
  23. {ok_script-2.0.14 → ok_script-2.0.15}/ok/core/config_schema.py +1 -1
  24. {ok_script-2.0.14 → ok_script-2.0.15}/ok/core/events.py +3 -3
  25. ok_script-2.0.15/ok/core/mcp_runner.py +331 -0
  26. ok_script-2.0.15/ok/core/mcp_server.py +351 -0
  27. ok_script-2.0.15/ok/core/plugin_staging.py +269 -0
  28. ok_script-2.0.15/ok/core/plugins.py +182 -0
  29. {ok_script-2.0.14 → ok_script-2.0.15}/ok/core/screenshot.py +39 -6
  30. {ok_script-2.0.14 → ok_script-2.0.15}/ok/core/script_packager.py +106 -20
  31. ok_script-2.0.15/ok/core/skills.py +42 -0
  32. {ok_script-2.0.14 → ok_script-2.0.15}/ok/core/start_controller.py +8 -1
  33. ok_script-2.0.15/ok/core/task_manager.py +565 -0
  34. {ok_script-2.0.14 → ok_script-2.0.15}/ok/core/template_store.py +1 -1
  35. {ok_script-2.0.14 → ok_script-2.0.15}/ok/core/ui_config.py +3 -13
  36. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/capture_methods/__init__.py +1 -1
  37. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/capture_methods/base.py +20 -2
  38. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/capture_methods/browser.py +4 -1
  39. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/capture_methods/windows_graphics.py +14 -1
  40. {ok_script-2.0.14 → ok_script-2.0.15}/ok/task/TaskExecutor.py +253 -16
  41. {ok_script-2.0.14 → ok_script-2.0.15}/ok/task/exceptions.py +8 -0
  42. {ok_script-2.0.14 → ok_script-2.0.15}/ok/task/task.py +19 -8
  43. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/overlay/win32_gdi.py +1 -1
  44. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/MainWindow.py +50 -43
  45. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/debug/DebugTab.py +116 -54
  46. ok_script-2.0.15/ok/ui/qt/debug/JobControls.py +128 -0
  47. ok_script-2.0.15/ok/ui/qt/debug/RunCodeTab.py +112 -0
  48. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/i18n/en_US.qm +0 -0
  49. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/i18n/en_US.ts +136 -753
  50. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/i18n/es_ES.qm +0 -0
  51. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/i18n/es_ES.ts +135 -752
  52. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/i18n/ja_JP.qm +0 -0
  53. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/i18n/ja_JP.ts +135 -752
  54. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/i18n/ko_KR.qm +0 -0
  55. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/i18n/ko_KR.ts +136 -753
  56. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/i18n/zh_CN.qm +0 -0
  57. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/i18n/zh_CN.ts +136 -753
  58. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/i18n/zh_TW.qm +0 -0
  59. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/i18n/zh_TW.ts +136 -753
  60. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/overlay/OverlayWindow.py +1 -1
  61. ok_script-2.0.15/ok/ui/qt/plugins/PluginTab.py +396 -0
  62. ok_script-2.0.15/ok/ui/qt/plugins/__init__.py +1 -0
  63. ok_script-2.0.15/ok/ui/qt/plugins/imported_tabs.py +192 -0
  64. ok_script-2.0.15/ok/ui/qt/resources.py +17829 -0
  65. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/start/StartCard.py +6 -0
  66. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/start/StartTab.py +17 -4
  67. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/ConfigItemFactory.py +3 -0
  68. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/EditTaskTab.py +56 -66
  69. ok_script-2.0.15/ok/ui/qt/tasks/LabelAndMcpServer.py +39 -0
  70. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/OneTimeTaskTab.py +18 -1
  71. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/StartButton.py +5 -0
  72. ok_script-2.0.15/ok/ui/qt/tasks/TaskManger.py +51 -0
  73. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/TemplateTab.py +74 -33
  74. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/util/pyappify_startup.py +4 -6
  75. ok_script-2.0.15/ok/ui/qt/widget/ImportWarningDialog.py +40 -0
  76. {ok_script-2.0.14 → ok_script-2.0.15}/ok/util/GlobalConfig.py +14 -0
  77. {ok_script-2.0.14 → ok_script-2.0.15}/ok/util/process.py +88 -21
  78. ok_script-2.0.15/ok/util/version.py +54 -0
  79. {ok_script-2.0.14 → ok_script-2.0.15/ok_script.egg-info}/PKG-INFO +10 -14
  80. {ok_script-2.0.14 → ok_script-2.0.15}/ok_script.egg-info/SOURCES.txt +41 -17
  81. {ok_script-2.0.14 → ok_script-2.0.15}/ok_script.egg-info/requires.txt +3 -5
  82. ok_script-2.0.15/ok_script.egg-info/top_level.txt +4 -0
  83. {ok_script-2.0.14 → ok_script-2.0.15}/pyproject.toml +6 -13
  84. ok_script-2.0.15/setup.py +43 -0
  85. ok_script-2.0.15/tests/test_cli.py +81 -0
  86. ok_script-2.0.15/tests/test_debug_job_controls.py +255 -0
  87. ok_script-2.0.15/tests/test_executor_jobs.py +479 -0
  88. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_headless_imports.py +4 -2
  89. ok_script-2.0.15/tests/test_mcp_runner.py +409 -0
  90. ok_script-2.0.15/tests/test_mcp_server.py +389 -0
  91. ok_script-2.0.15/tests/test_mcp_setting.py +122 -0
  92. ok_script-2.0.15/tests/test_ok_mutex.py +66 -0
  93. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_package_metadata.py +2 -1
  94. ok_script-2.0.15/tests/test_plugin_staging.py +295 -0
  95. ok_script-2.0.15/tests/test_plugin_tabs.py +540 -0
  96. ok_script-2.0.15/tests/test_plugins.py +336 -0
  97. ok_script-2.0.15/tests/test_process_mutex.py +182 -0
  98. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_runtime_startup.py +14 -71
  99. ok_script-2.0.15/tests/test_screenshot_naming.py +46 -0
  100. ok_script-2.0.15/tests/test_screenshot_rendering.py +34 -0
  101. ok_script-2.0.15/tests/test_skills.py +81 -0
  102. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_task_executor_queue.py +5 -0
  103. ok_script-2.0.15/tests/test_task_reloading.py +325 -0
  104. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_template_tab.py +39 -0
  105. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_translation_fallback.py +24 -22
  106. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_ui_config.py +5 -10
  107. ok_script-2.0.15/tests/test_version.py +57 -0
  108. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_windows_graphics_capture.py +90 -1
  109. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_windows_schedule_target_parse.py +0 -26
  110. ok_script-2.0.14/ok/core/task_manager.py +0 -422
  111. ok_script-2.0.14/ok/task/web.py +0 -162
  112. ok_script-2.0.14/ok/ui/qt/debug/RunCodeTab.py +0 -63
  113. ok_script-2.0.14/ok/ui/qt/resources.py +0 -20385
  114. ok_script-2.0.14/ok/ui/qt/tasks/TaskManger.py +0 -12
  115. ok_script-2.0.14/ok/ui/web/__init__.py +0 -6
  116. ok_script-2.0.14/ok/ui/web/app.py +0 -1646
  117. ok_script-2.0.14/ok/ui/web/requirements.py +0 -13
  118. ok_script-2.0.14/ok/ui/web/server.py +0 -686
  119. ok_script-2.0.14/ok/ui/web/static/app.js +0 -11
  120. ok_script-2.0.14/ok/ui/web/static/chunk-fluent.js +0 -2
  121. ok_script-2.0.14/ok/ui/web/static/chunk-react.js +0 -9
  122. ok_script-2.0.14/ok/ui/web/static/index.css +0 -1
  123. ok_script-2.0.14/ok/ui/web/static/index.html +0 -17
  124. ok_script-2.0.14/ok_script.egg-info/top_level.txt +0 -6
  125. ok_script-2.0.14/scripts/generate_web_i18n.py +0 -57
  126. ok_script-2.0.14/setup.py +0 -17
  127. ok_script-2.0.14/tests/test_cli.py +0 -59
  128. ok_script-2.0.14/tests/test_ok_mutex.py +0 -40
  129. ok_script-2.0.14/tests/test_process_mutex.py +0 -78
  130. ok_script-2.0.14/tests/test_web_app.py +0 -311
  131. ok_script-2.0.14/tests/test_web_i18n.py +0 -24
  132. ok_script-2.0.14/tests/test_web_server.py +0 -511
  133. ok_script-2.0.14/tests/test_web_task_tabs.py +0 -143
  134. ok_script-2.0.14/tests/test_web_ui_pages.py +0 -277
  135. ok_script-2.0.14/tests/test_web_ui_tasks.py +0 -183
  136. {ok_script-2.0.14 → ok_script-2.0.15}/LICENSE.txt +0 -0
  137. {ok_script-2.0.14 → ok_script-2.0.15}/diagnostics/qq_trace.py +0 -0
  138. {ok_script-2.0.14 → ok_script-2.0.15}/ok/__main__.py +0 -0
  139. {ok_script-2.0.14 → ok_script-2.0.15}/ok/alas/__init__.py +0 -0
  140. {ok_script-2.0.14 → ok_script-2.0.15}/ok/alas/emulator_base.py +0 -0
  141. {ok_script-2.0.14 → ok_script-2.0.15}/ok/alas/emulator_windows.py +0 -0
  142. {ok_script-2.0.14 → ok_script-2.0.15}/ok/alas/platform_windows.py +0 -0
  143. {ok_script-2.0.14 → ok_script-2.0.15}/ok/alas/utils.py +0 -0
  144. {ok_script-2.0.14 → ok_script-2.0.15}/ok/capture/__init__.py +0 -0
  145. {ok_script-2.0.14 → ok_script-2.0.15}/ok/capture/adb/__init__.py +0 -0
  146. {ok_script-2.0.14 → ok_script-2.0.15}/ok/capture/adb/deep.py +0 -0
  147. {ok_script-2.0.14 → ok_script-2.0.15}/ok/capture/adb/minitouch.py +0 -0
  148. {ok_script-2.0.14 → ok_script-2.0.15}/ok/capture/adb/nemu_ipc.py +0 -0
  149. {ok_script-2.0.14 → ok_script-2.0.15}/ok/capture/adb/nemu_utils.py +0 -0
  150. {ok_script-2.0.14 → ok_script-2.0.15}/ok/capture/adb/pool.py +0 -0
  151. {ok_script-2.0.14 → ok_script-2.0.15}/ok/capture/adb/timer.py +0 -0
  152. {ok_script-2.0.14 → ok_script-2.0.15}/ok/capture/adb/util.py +0 -0
  153. {ok_script-2.0.14 → ok_script-2.0.15}/ok/capture/windows/__init__.py +0 -0
  154. {ok_script-2.0.14 → ok_script-2.0.15}/ok/capture/windows/d3d11.py +0 -0
  155. {ok_script-2.0.14 → ok_script-2.0.15}/ok/capture/windows/dump.py +0 -0
  156. {ok_script-2.0.14 → ok_script-2.0.15}/ok/core/__init__.py +0 -0
  157. {ok_script-2.0.14 → ok_script-2.0.15}/ok/core/downloads.py +0 -0
  158. {ok_script-2.0.14 → ok_script-2.0.15}/ok/core/icons.py +0 -0
  159. {ok_script-2.0.14 → ok_script-2.0.15}/ok/core/notifications.py +0 -0
  160. {ok_script-2.0.14 → ok_script-2.0.15}/ok/core/script_editing.py +0 -0
  161. {ok_script-2.0.14 → ok_script-2.0.15}/ok/core/script_templates.py +0 -0
  162. {ok_script-2.0.14 → ok_script-2.0.15}/ok/core/translation.py +0 -0
  163. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/DeviceManager.py +0 -0
  164. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/__init__.py +0 -0
  165. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/capture.py +0 -0
  166. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/capture_methods/adb.py +0 -0
  167. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/capture_methods/bitblt.py +0 -0
  168. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/capture_methods/bitblt_utils.py +0 -0
  169. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/capture_methods/desktop_duplication.py +0 -0
  170. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/capture_methods/hwnd_window.py +0 -0
  171. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/capture_methods/image.py +0 -0
  172. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/capture_methods/nemu_ipc.py +0 -0
  173. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/capture_methods/types.py +0 -0
  174. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/capture_methods/update.py +0 -0
  175. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/capture_methods/windows_graphics_hdr.py +0 -0
  176. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/interaction.py +0 -0
  177. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/interaction_methods/__init__.py +0 -0
  178. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/interaction_methods/adb.py +0 -0
  179. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/interaction_methods/base.py +0 -0
  180. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/interaction_methods/browser.py +0 -0
  181. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/interaction_methods/do_nothing.py +0 -0
  182. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/interaction_methods/foreground_post_message.py +0 -0
  183. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/interaction_methods/genshin.py +0 -0
  184. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/interaction_methods/keys.py +0 -0
  185. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/interaction_methods/post_message.py +0 -0
  186. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/interaction_methods/pydirect.py +0 -0
  187. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/interaction_methods/pynput.py +0 -0
  188. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/interaction_methods/swipe.py +0 -0
  189. {ok_script-2.0.14 → ok_script-2.0.15}/ok/device/intercation.py +0 -0
  190. {ok_script-2.0.14 → ok_script-2.0.15}/ok/feature/Box.py +0 -0
  191. {ok_script-2.0.14 → ok_script-2.0.15}/ok/feature/Feature.py +0 -0
  192. {ok_script-2.0.14 → ok_script-2.0.15}/ok/feature/FeatureSet.py +0 -0
  193. {ok_script-2.0.14 → ok_script-2.0.15}/ok/feature/__init__.py +0 -0
  194. {ok_script-2.0.14 → ok_script-2.0.15}/ok/gui/__init__.py +0 -0
  195. {ok_script-2.0.14 → ok_script-2.0.15}/ok/gui/util/pyappify_startup.py +0 -0
  196. {ok_script-2.0.14 → ok_script-2.0.15}/ok/notification/__init__.py +0 -0
  197. {ok_script-2.0.14 → ok_script-2.0.15}/ok/notification/manager.py +0 -0
  198. {ok_script-2.0.14 → ok_script-2.0.15}/ok/notification/messenger_images.py +0 -0
  199. {ok_script-2.0.14 → ok_script-2.0.15}/ok/notification/pipeline.py +0 -0
  200. {ok_script-2.0.14 → ok_script-2.0.15}/ok/notification/ppocr.py +0 -0
  201. {ok_script-2.0.14 → ok_script-2.0.15}/ok/notification/providers.py +0 -0
  202. {ok_script-2.0.14 → ok_script-2.0.15}/ok/notification/system.py +0 -0
  203. {ok_script-2.0.14 → ok_script-2.0.15}/ok/notification/windows_messenger.py +0 -0
  204. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ocr/__init__.py +0 -0
  205. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ocr/download_paddle_model.py +0 -0
  206. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/Windows/Foundation/Collections.py +0 -0
  207. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/Windows/Foundation/__init__.py +0 -0
  208. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/Windows/Globalization/__init__.py +0 -0
  209. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/Windows/Graphics/Capture/__init__.py +0 -0
  210. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/Windows/Graphics/DirectX/Direct3D11/__init__.py +0 -0
  211. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/Windows/Graphics/DirectX/__init__.py +0 -0
  212. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/Windows/Graphics/Imaging/__init__.py +0 -0
  213. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/Windows/Graphics/__init__.py +0 -0
  214. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/Windows/Media/Ocr/__init__.py +0 -0
  215. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/Windows/Media/__init__.py +0 -0
  216. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/Windows/Security/Cryptography/__init__.py +0 -0
  217. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/Windows/Security/__init__.py +0 -0
  218. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/Windows/Storage/Streams/__init__.py +0 -0
  219. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/Windows/Storage/__init__.py +0 -0
  220. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/Windows/UI/ViewManagement/__init__.py +0 -0
  221. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/Windows/UI/__init__.py +0 -0
  222. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/Windows/__init__.py +0 -0
  223. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/__init__.py +0 -0
  224. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/delegate.py +0 -0
  225. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/export.py +0 -0
  226. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/idldsl.py +0 -0
  227. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/inspectable.py +0 -0
  228. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/roapi.py +0 -0
  229. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/types.py +0 -0
  230. {ok_script-2.0.14 → ok_script-2.0.15}/ok/rotypes/winstring.py +0 -0
  231. {ok_script-2.0.14 → ok_script-2.0.15}/ok/task/DiagnosisTask.py +0 -0
  232. {ok_script-2.0.14 → ok_script-2.0.15}/ok/task/__init__.py +0 -0
  233. {ok_script-2.0.14 → ok_script-2.0.15}/ok/test/OKTestRunner.py +0 -0
  234. {ok_script-2.0.14 → ok_script-2.0.15}/ok/test/RunTests.py +0 -0
  235. {ok_script-2.0.14 → ok_script-2.0.15}/ok/test/TaskTestCase.py +0 -0
  236. {ok_script-2.0.14 → ok_script-2.0.15}/ok/test/__init__.py +0 -0
  237. {ok_script-2.0.14 → ok_script-2.0.15}/ok/third_party/__init__.py +0 -0
  238. {ok_script-2.0.14 → ok_script-2.0.15}/ok/third_party/paperclip.py +0 -0
  239. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/__init__.py +0 -0
  240. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/overlay/__init__.py +0 -0
  241. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/Communicate.py +0 -0
  242. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/MessageWindow.py +0 -0
  243. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/StartController.py +0 -0
  244. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/TabTitles.py +0 -0
  245. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/__init__.py +0 -0
  246. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/about/AboutTab.py +0 -0
  247. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/about/HttpTextEdit.py +0 -0
  248. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/about/LinksBar.py +0 -0
  249. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/about/ProjectCard.py +0 -0
  250. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/about/UpdateCard.py +0 -0
  251. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/about/VersionCard.py +0 -0
  252. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/about/__init__.py +0 -0
  253. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/common/OKIcon.py +0 -0
  254. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/common/__init__.py +0 -0
  255. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/common/accent_color.py +0 -0
  256. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/common/config.py +0 -0
  257. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/common/design_system.py +0 -0
  258. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/common/icons.py +0 -0
  259. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/common/style_sheet.py +0 -0
  260. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/debug/OverlayWidget.py +0 -0
  261. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/debug/Screenshot.py +0 -0
  262. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/debug/__init__.py +0 -0
  263. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/events.py +0 -0
  264. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/i18n/GettextTranslator.py +0 -0
  265. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/i18n/__init__.py +0 -0
  266. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/i18n/path.py +0 -0
  267. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/i18n/update.py +0 -0
  268. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/overlay/__init__.py +0 -0
  269. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/qss/__init__.py +0 -0
  270. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/qss/dark/card.qss +0 -0
  271. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/qss/dark/discord.svg +0 -0
  272. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/qss/dark/heart.svg +0 -0
  273. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/qss/dark/message_window.qss +0 -0
  274. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/qss/dark/setting_interface.qss +0 -0
  275. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/qss/dark/status_bar.qss +0 -0
  276. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/qss/dark/stop.svg +0 -0
  277. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/qss/dark/tab.qss +0 -0
  278. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/qss/light/card.qss +0 -0
  279. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/qss/light/discord.svg +0 -0
  280. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/qss/light/heart.svg +0 -0
  281. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/qss/light/message_window.qss +0 -0
  282. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/qss/light/setting_interface.qss +0 -0
  283. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/qss/light/status_bar.qss +0 -0
  284. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/qss/light/stop.svg +0 -0
  285. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/qss/light/tab.qss +0 -0
  286. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/qt.qrc +0 -0
  287. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/settings/GlobalConfigCard.py +0 -0
  288. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/settings/GlobalConfigTab.py +0 -0
  289. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/settings/SettingTab.py +0 -0
  290. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/settings/__init__.py +0 -0
  291. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/start/LogWindow.py +0 -0
  292. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/start/SelectCaptureListView.py +0 -0
  293. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/start/SelectInteractionListView.py +0 -0
  294. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/start/__init__.py +0 -0
  295. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/ConfigCard.py +0 -0
  296. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/ConfigLabelAndWidget.py +0 -0
  297. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/LabelAndButtons.py +0 -0
  298. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/LabelAndDoubleSpinBox.py +0 -0
  299. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/LabelAndDropDown.py +0 -0
  300. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/LabelAndFileSelector.py +0 -0
  301. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/LabelAndGlobal.py +0 -0
  302. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/LabelAndLineEdit.py +0 -0
  303. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/LabelAndList.py +0 -0
  304. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/LabelAndMultiSelection.py +0 -0
  305. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/LabelAndSpinBox.py +0 -0
  306. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/LabelAndSwitchButton.py +0 -0
  307. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/LabelAndTextEdit.py +0 -0
  308. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/LabelAndWidget.py +0 -0
  309. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/MarkUpWindow.py +0 -0
  310. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/ModifyListDialog.py +0 -0
  311. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/ModifyListItem.py +0 -0
  312. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/PythonHighlighter.py +0 -0
  313. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/RecordScript.py +0 -0
  314. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/ScheduleTaskTab.py +0 -0
  315. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/ScriptPackager.py +0 -0
  316. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/TaskCard.py +0 -0
  317. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/TaskOpButton.py +0 -0
  318. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/TaskTab.py +0 -0
  319. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/TemplateFactory.py +0 -0
  320. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/TooltipTableWidget.py +0 -0
  321. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/TriggerTaskTab.py +0 -0
  322. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/__init__.py +0 -0
  323. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/tasks/schedule_index_sync.py +0 -0
  324. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/util/Alert.py +0 -0
  325. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/util/InitWorker.py +0 -0
  326. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/util/__init__.py +0 -0
  327. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/util/app.py +0 -0
  328. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/util/download.py +0 -0
  329. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/util/pip_util.py +0 -0
  330. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/util/touch_scroll.py +0 -0
  331. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/util/windows_thumbnail.py +0 -0
  332. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/widget/BaseLoading.py +0 -0
  333. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/widget/BaseWindow.py +0 -0
  334. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/widget/Card.py +0 -0
  335. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/widget/CustomTab.py +0 -0
  336. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/widget/EmptyCard.py +0 -0
  337. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/widget/ExpandCardLayout.py +0 -0
  338. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/widget/FlowLayout.py +0 -0
  339. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/widget/FramelessDialog.py +0 -0
  340. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/widget/ImageWidget.py +0 -0
  341. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/widget/ListTableWidgetItem.py +0 -0
  342. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/widget/NumericTableWidgetItem.py +0 -0
  343. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/widget/OkCompactSpinBox.py +0 -0
  344. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/widget/SortingTableWidgetItem.py +0 -0
  345. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/widget/StartLoadingDialog.py +0 -0
  346. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/widget/StatusBar.py +0 -0
  347. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/widget/Tab.py +0 -0
  348. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/widget/TabWidget.py +0 -0
  349. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/widget/UpdateConfigWidgetItem.py +0 -0
  350. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/widget/WidgetWithVLabel.py +0 -0
  351. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/widget/YesNonWidgetItem.py +0 -0
  352. {ok_script-2.0.14 → ok_script-2.0.15}/ok/ui/qt/widget/__init__.py +0 -0
  353. {ok_script-2.0.14 → ok_script-2.0.15}/ok/update/__init__.py +0 -0
  354. {ok_script-2.0.14 → ok_script-2.0.15}/ok/update/copy_ok_folder.py +0 -0
  355. {ok_script-2.0.14 → ok_script-2.0.15}/ok/update/inline_ok_requirements.py +0 -0
  356. {ok_script-2.0.14 → ok_script-2.0.15}/ok/util/Analytics.py +0 -0
  357. {ok_script-2.0.14 → ok_script-2.0.15}/ok/util/__init__.py +0 -0
  358. {ok_script-2.0.14 → ok_script-2.0.15}/ok/util/blur.py +0 -0
  359. {ok_script-2.0.14 → ok_script-2.0.15}/ok/util/clazz.py +0 -0
  360. {ok_script-2.0.14 → ok_script-2.0.15}/ok/util/collection.py +0 -0
  361. {ok_script-2.0.14 → ok_script-2.0.15}/ok/util/color.py +0 -0
  362. {ok_script-2.0.14 → ok_script-2.0.15}/ok/util/config.py +0 -0
  363. {ok_script-2.0.14 → ok_script-2.0.15}/ok/util/explorer.py +0 -0
  364. {ok_script-2.0.14 → ok_script-2.0.15}/ok/util/file.py +0 -0
  365. {ok_script-2.0.14 → ok_script-2.0.15}/ok/util/gpu_driver_settings.py +0 -0
  366. {ok_script-2.0.14 → ok_script-2.0.15}/ok/util/handler.py +0 -0
  367. {ok_script-2.0.14 → ok_script-2.0.15}/ok/util/i18n.py +0 -0
  368. {ok_script-2.0.14 → ok_script-2.0.15}/ok/util/logger.py +0 -0
  369. {ok_script-2.0.14 → ok_script-2.0.15}/ok/util/partial_sync_repo.py +0 -0
  370. {ok_script-2.0.14 → ok_script-2.0.15}/ok/util/print_hwnd.py +0 -0
  371. {ok_script-2.0.14 → ok_script-2.0.15}/ok/util/window.py +0 -0
  372. {ok_script-2.0.14 → ok_script-2.0.15}/ok/util/windows_schedule.py +0 -0
  373. {ok_script-2.0.14 → ok_script-2.0.15}/ok_script.egg-info/dependency_links.txt +0 -0
  374. {ok_script-2.0.14 → ok_script-2.0.15}/ok_script.egg-info/entry_points.txt +0 -0
  375. {ok_script-2.0.14 → ok_script-2.0.15}/ok_script.egg-info/not-zip-safe +0 -0
  376. {ok_script-2.0.14 → ok_script-2.0.15}/setup.cfg +0 -0
  377. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_accent_color.py +0 -0
  378. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_app.py +0 -0
  379. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_base_interaction.py +0 -0
  380. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_blur.py +0 -0
  381. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_box.py +0 -0
  382. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_capture_update.py +0 -0
  383. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_config_card.py +0 -0
  384. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_core_events.py +0 -0
  385. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_core_ui_services.py +0 -0
  386. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_device_manager.py +0 -0
  387. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_expand_card_layout.py +0 -0
  388. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_explorer.py +0 -0
  389. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_global_config.py +0 -0
  390. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_gpu_driver_settings.py +0 -0
  391. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_handler.py +0 -0
  392. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_inline_ok_requirements.py +0 -0
  393. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_logger.py +0 -0
  394. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_main_window_notifications.py +0 -0
  395. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_main_window_startup_tab.py +0 -0
  396. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_main_window_system_theme.py +0 -0
  397. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_missing_frame.py +0 -0
  398. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_navigation_state.py +0 -0
  399. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_nemu_ipc_capture.py +0 -0
  400. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_notifications.py +0 -0
  401. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_overlay_custom_draw.py +0 -0
  402. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_overlay_lifecycle.py +0 -0
  403. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_process.py +0 -0
  404. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_pyappify_startup_update.py +0 -0
  405. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_qt_events.py +0 -0
  406. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_qt_legacy_imports.py +0 -0
  407. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_qt_page_layout.py +0 -0
  408. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_schedule_startup.py +0 -0
  409. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_schedule_task_index_sync.py +0 -0
  410. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_start_controller.py +0 -0
  411. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_start_tab_overlay.py +0 -0
  412. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_task_ui.py +0 -0
  413. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_template_compression.py +0 -0
  414. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_touch_scroll.py +0 -0
  415. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_windows_graphics_hdr.py +0 -0
  416. {ok_script-2.0.14 → ok_script-2.0.15}/tests/test_windows_schedule_xml.py +0 -0
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: develop
3
+ description: Implement and debug third-party application tasks with the ok-script library or MCP server, preferring in-place task edits and reloads with verified target recovery.
4
+ ---
5
+
6
+ # Develop
7
+
8
+ Use this skill inside the consuming application's project. Edit its task modules, configuration, and assets through the installed ok-script APIs and local MCP server. Developing or changing the ok-script library itself is outside this skill's scope.
9
+
10
+ Read [docs/mcp.md](../../../docs/mcp.md) for the current server, tools, task contract, and artifacts. The coding agent already has local file and process access: write code and read logs/images directly. Use [setup-env](../setup-env/SKILL.md) or [setup-project](../setup-project/SKILL.md) only when setup is missing.
11
+
12
+ For screenshot annotations and named template features, use [generate-templates](../generate-templates/SKILL.md): retain originals in `ok_templates`, update its COCO annotations, generate runtime assets with the existing exporter, and verify `find_feature`/`find_one` against those assets.
13
+
14
+ For existing registered tasks, prefer [reload-tasks](../reload-tasks/SKILL.md): discover their source with `list_tasks()`, edit it in place, call `reload_tasks(task_ids=[...])`, and wait for a successful reload before testing. Keep automation behavior in its existing module; use temporary MCP files only as thin validation harnesses. Create new task implementations when the requested functionality is new.
15
+
16
+ ## Connect to the local runtime
17
+
18
+ Use the project's venv and existing development launcher. Without a custom launcher, start `python -m ok mcp --config <module>:<config>` through that interpreter from the project directory. Keep it running between attempts. The agent can start this process itself; launch background console helpers hidden on Windows.
19
+
20
+ Read the configured artifact directory's `connection.json` (normally `logs/mcp/connection.json`) for URL, bearer token, and PID. Check that PID and listener are live; the file can outlast its server. Connect with the supplied URL and `Authorization: Bearer <token>` header. Keep tokens out of normal output. Use a native MCP connection when available, or the installed official SDK and a local client script when it is not.
21
+
22
+ The tools are `list_tasks()`, `reload_tasks(task_ids=None)`, `run_task(file_path)`, `get_run_status(run_id)`, `stop_task(run_id)`, and `screenshot()`. Reloads return run IDs tracked by the same status and stop tools. Pass an absolute path to `run_task`; keep task logic in files. Read logs and edit files locally rather than adding inline-code, file-editing, or log-reading tools.
23
+
24
+ ## Define recovery and success before iterating
25
+
26
+ For MCP execution, define a synchronous `class Task(BaseTask)` in the submitted file. For an existing task, make this a thin harness that delegates to its registered instance. Implement:
27
+
28
+ - `reset_to_start()`: restore the application's baseline before every attempt, including the first. Reuse an existing recovery function when available, or write one. Handle partially completed actions and blocking modal dialogs; make repeated resets safe.
29
+ - `verify_start_state()`: check observable baseline conditions with assertions or return `True`. A failed verification must prevent the main actions.
30
+ - `run()`: perform the automation and assert application-level success. Completing Python execution alone does not prove success.
31
+
32
+ Use existing task functions through `self.get_task_by_class(ExistingTask)` when that class is registered. A capture/scene cache reset such as `reset_scene()` does not undo application actions. Use a no-op application reset only when the task makes no state changes. Keep construction and discovery lightweight: the GUI discovers tasks before its executor starts, so avoid executor-dependent sleep/capture or interactive recovery in `on_create()`.
33
+
34
+ Prefer visual geometry, color classification, and template matching for regular controls and small digits. Use OCR when the target requires it, rather than introducing it by default. Inspect captured pixels, coordinate scaling, and UI timing before changing recognition thresholds. Verify decisions from visible UI; do not substitute hidden application state or process memory for a requested visual algorithm.
35
+
36
+ ## Run, observe, modify
37
+
38
+ 1. Establish working capture and each required input action on the real target. Prioritize PostMessage for background interaction and verify actual effects; a successful API call does not establish that the target reacted. For Windows access-denied errors, ineffective gestures, or a foreground fallback, read [Windows input validation](references/windows-input.md) before changing input modes.
39
+ 2. Put milestone logs, screenshots, bounded waits, and assertions in task code. MCP provides `self.artifact_directory` for per-attempt results; normal task screenshots use the configured screenshot folder. Save evidence around failures before resetting.
40
+ 3. Submit the task path with `run_task`. Poll `get_run_status` until `succeeded`, `failed`, or `cancelled`. Inspect local `run.log`, `status.json`, task output, and screenshots. Background-thread logs may be in the application's normal log files.
41
+ 4. Use `screenshot()` for additional observations. It captures fresh frames when idle; while a task runs it saves the latest cached frame. Inspect `captured_at` and `cached`. Before the first captured frame there may be no image. Capture again through task code when fresh evidence is needed; normal task screenshots can finish writing asynchronously.
42
+ 5. Fix the evidenced cause in the existing registered task's source, reload its ID through MCP, and wait for success before resubmitting the validation harness. The runner also reloads the submitted harness file on each invocation. Registered task modules and plugin helpers refresh through `reload_tasks`; helpers outside plugins remain cached and require restarting the owned runtime after edits. Do not infer that a failed reload tested the updated code.
43
+ 6. Continue through the requested success condition, checking repeat runs and relevant target variations. Bound in-task retries and preserve why an attempt failed; do not retry irreversible actions beyond the user's authorization.
44
+
45
+ Only one attempt owns the executor. Cancellation is cooperative: `stopping` is not terminal, and a client timeout is not proof that execution stopped. Wait for the task and cleanup to finish before resetting or submitting again. If blocked code requires restarting the runtime, terminate only the verified owned process and wait for its exit before restarting against the same target.
46
+
47
+ ## Make the task usable from the GUI
48
+
49
+ When the task is also a user feature, register it in `onetime_tasks` and set a useful task name and description. File submissions alone do not populate the GUI list.
50
+
51
+ The MCP runner invokes reset/verification and supplies an artifact directory. The normal GUI scheduler calls `run()` without those MCP hooks. Support both paths: let GUI execution prepare recovery, verification, and a fresh local artifact directory; honor MCP's already verified start and provided directory. Clear per-attempt flags in `finally`, and refresh settings, timers, results, and artifact paths for repeated GUI runs. Keep recovery in the executor execution path, not GUI construction.
52
+
53
+ When GUI lifecycle is in scope, use the separate MCP-disabled GUI launcher with `pythonw.exe` and test the actual task card's Start action with available UI tools. Check that starting the user GUI replaces the same project's console runtime and closes its MCP listener. A passing file submission alone does not verify GUI lifecycle behavior. Computer Use is an optional means of testing the desktop task card, not a dependency of game automation through ok-script MCP. If desktop UI tooling is unavailable, report the missing Start-action check separately; do not block MCP game validation, introduce a runtime dependency, or claim that launching the GUI verifies its Start button.
54
+
55
+ Report the task/config paths, tested target states or sizes, observed success evidence, relevant checks, and remaining limits. Extend existing tests for meaningful recognition, recovery, or lifecycle changes; use real target execution to verify input and capture behavior.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Develop Application Tasks"
3
+ short_description: "Build application tasks using ok-script and MCP"
4
+ default_prompt: "Use $develop to implement or update an automation task, prefer editing and reloading existing registered tasks through MCP, and verify the target state before execution."
@@ -0,0 +1,89 @@
1
+ # Validate Windows input through MCP
2
+
3
+ Use this reference when capture works but input fails, a log reports access
4
+ denied, or an operation may need foreground input. Diagnose the particular
5
+ action before changing the application's configured interaction backend.
6
+
7
+ ## Separate permission, delivery, and recognition
8
+
9
+ - Confirm the configured target, capture dimensions, coordinate mapping, and a
10
+ fresh frame. A cached observation or a successful input API return does not
11
+ prove that the game received the action.
12
+ - For `PostMessage` error 5 / access denied, inspect the privilege level of the
13
+ **serving ok-script process** and the target process using available read-only
14
+ diagnostics. `ok.util.process.is_admin()` called through an MCP observation
15
+ task describes the runtime; calling it in the agent's client describes a
16
+ different process. Working capture does not establish matching input rights.
17
+ - If a lower-privilege runtime is confirmed against an elevated target, restart
18
+ only the verified, owned runtime at the required privilege level before
19
+ experimenting with recognition thresholds or input backends. Do not elevate
20
+ by default, disable security controls, automate UAC, or bypass execution
21
+ policy. If elevation is unavailable, report the specific blocker.
22
+ - When there is no access-denied error, inspect focus, input coordinates,
23
+ scaling, press duration, drag endpoints, and release coordinates. Failure of
24
+ one drag is not evidence that all background input is unsupported.
25
+
26
+ ## Restart an owned runtime when elevation is needed
27
+
28
+ 1. Preserve the failing log and observation. Respect ownership: an existing user
29
+ GUI is not an agent-owned console to terminate merely for development.
30
+ 2. For an owned MCP runtime, request `exit_process(reason=...)`, wait locally for
31
+ its returned PID to exit, then relaunch with the consuming project's absolute
32
+ venv interpreter, working directory, and actual launcher/config arguments.
33
+ 3. On Windows, an allowed elevation path is PowerShell `Start-Process` with
34
+ `-Verb RunAs` and `-WindowStyle Hidden`. The user handles any OS UAC prompt;
35
+ explain why it appears. Preserve the project's config and selected target.
36
+ 4. Rediscover the connection and validate the new PID, listener, and project.
37
+ Do not reuse the old URL, credentials, or run IDs. Verify runtime privilege,
38
+ capture freshness, and the same input action again. Restarting ok-script does
39
+ not reset the game UI.
40
+
41
+ ## Verify input by action and window state
42
+
43
+ Use a small MCP harness that restores and verifies an appropriate starting
44
+ state. Exercise an action with a known, visible effect; bound retries and stop
45
+ to diagnose repeated no-effects instead of continuing the full task.
46
+
47
+ | Action | Evidence of delivery |
48
+ | --- | --- |
49
+ | Ordinary button click | The intended page, selection, or modal changes |
50
+ | Key | Its intended visible menu or state changes |
51
+ | Drag or swipe | The item actually moves, the list scrolls, or the game accepts the move |
52
+
53
+ For example, a successful match-three swap changes pieces and an accepted-move
54
+ counter or elimination result. Mouse motion alone is insufficient evidence.
55
+
56
+ Test required actions in the foreground first, then test PostMessage while the
57
+ game is unfocused or covered. Observe the real foreground window and cursor as
58
+ well as the target's response. Record each tested state; do not infer minimized
59
+ support from covered-window support, or drag support from a working menu click.
60
+ Change one factor at a time so privilege changes are not confused with backend
61
+ changes. Preserve pre-action and post-action evidence for failed and successful
62
+ cases, including the actual backend and fresh capture timestamps.
63
+
64
+ ## Use a narrow foreground fallback
65
+
66
+ If an action still has no observed background effect after permission and
67
+ coordinate checks, a foreground fallback can be appropriate within the user's
68
+ task. Describe the evidence as an observed limitation of that action and tested
69
+ backend; do not assert that the game intrinsically requires foreground input.
70
+
71
+ - Prefer the library's existing interaction APIs. Inspect the installed backend
72
+ before naming its OS APIs or assuming timing/coordinate behavior. For example,
73
+ a tested `PynputInteraction.swipe()` may delegate cursor positioning to pynput's
74
+ Windows `SetCursorPos` and button events to `SendInput`; verify the local code.
75
+ - Limit the fallback to actions that need it. Keep working background buttons
76
+ and keys on the configured backend rather than changing global settings.
77
+ - Inform the user that the operation brings the game forward and occupies the
78
+ real cursor. After activation, verify the current target is foreground before
79
+ injecting input; some swipe implementations do not enforce `clickable()`.
80
+ If focus cannot be obtained or is lost, pause the gesture or fail clearly.
81
+ - Keep coordinates relative to the captured target and use its capture-to-screen
82
+ conversion. Ensure button release in cleanup if constructing a custom gesture.
83
+ Restore temporary interaction overrides in `finally`.
84
+ - Re-run the actual registered task through MCP. Report background and foreground
85
+ validation separately, naming the action, backend, tested target state, visible
86
+ result, cursor/focus side effects, and any remaining untested cases.
87
+
88
+ Desktop task-card testing is separate from game interaction. A Computer Use
89
+ plugin used to inspect the GUI does not belong in the task's dependencies.
@@ -0,0 +1,185 @@
1
+ ---
2
+ name: generate-templates
3
+ description: Create template matching assets for a third-party ok-script application from its screenshots and COCO annotations, then verify them with find_feature or find_one.
4
+ ---
5
+
6
+ # Generate and use templates
7
+
8
+ Work on the consuming application's screenshots, annotations, task code, and
9
+ assets using the installed library. All project-relative paths below refer to
10
+ that application's root, not the ok-script library directory.
11
+
12
+ Use the existing pipeline: original screenshots in `ok_templates/`, annotations
13
+ in `ok_templates/coco_annotations.json`, and `compress_copy_coco` to generate
14
+ runtime assets. Keep source screenshots intact so both agents and the Template
15
+ tab can inspect and reannotate them. No new asset format or MCP tools are needed.
16
+
17
+ Run from the automation project's root using its interpreter, following
18
+ [use-venv](../use_venv/SKILL.md). For live capture and task execution follow
19
+ [develop](../develop/SKILL.md), including reset, baseline verification, and
20
+ application-level success checks.
21
+
22
+ ## Capture and choose the rectangle
23
+
24
+ Use an existing original screenshot or the MCP `screenshot()` result. Check its
25
+ dimensions, `captured_at`, and `cached` before treating it as current evidence.
26
+ Copy the original file into `ok_templates/` under an unused filename; reuse it
27
+ if already there. Do not overwrite a different image with the same name. Keep
28
+ files directly in this folder: the exporter resolves source images by basename.
29
+ For an in-memory frame, `CocoTemplateStore.save_frame(frame)` saves a PNG and
30
+ registers it in COCO; do not register the same frame repeatedly during iteration.
31
+
32
+ View the actual screenshot before choosing a rectangle. COCO `bbox` is
33
+ `[x, y, width, height]` in original screenshot pixels, not two corners or desktop
34
+ coordinates. Map any resized preview coordinates back to the original. Choose
35
+ a distinctive, stable patch; avoid animation, changing text, and flat colors.
36
+ Save and inspect a crop preview before generating assets. Preserve full source
37
+ dimensions and location because the matcher uses them for scaling and search.
38
+
39
+ ## Update source annotations
40
+
41
+ Use `ok.core.template_store.CocoTemplateStore`. Validate existing JSON with
42
+ `json.load` before mutation: `store.load()` otherwise treats malformed JSON as
43
+ empty. Serialize GUI and agent edits; the store's lock is only process-local.
44
+
45
+ `replace_annotations(image_name, annotations)` replaces ALL annotations on that
46
+ image. Read them first and preserve unrelated entries. Validate positive integer
47
+ dimensions and bounds yourself because the store silently clamps rectangles.
48
+ Use unique category names across the dataset; duplicate categories on different
49
+ images are not supported appearance variants. Prefer Python identifiers such
50
+ as `settings_save` if generating a label enum. Names beginning with `box_` are
51
+ region annotations whose pixels are omitted during export; do not use that
52
+ prefix for a visual template.
53
+
54
+ Example after copying `settings-open.png` into `ok_templates` (adapt coordinates
55
+ to the image you inspected):
56
+
57
+ ```python
58
+ import json
59
+ from pathlib import Path
60
+ import cv2
61
+ from ok.core.template_store import CocoTemplateStore
62
+
63
+ store = CocoTemplateStore("ok_templates")
64
+ if store.coco_path.exists():
65
+ with store.coco_path.open(encoding="utf-8") as stream:
66
+ json.load(stream) # Stop on corrupt metadata before calling store.load().
67
+ image_name, name = "settings-open.png", "settings_save"
68
+ x, y, width, height = 1480, 920, 160, 48
69
+ source = cv2.imread(str(store.image_path(image_name)))
70
+ assert source is not None
71
+ assert 0 <= x < x + width <= source.shape[1]
72
+ assert 0 <= y < y + height <= source.shape[0]
73
+ data = store.load()
74
+ category_ids = {c["id"] for c in data["categories"] if c["name"] == name}
75
+ image_ids = {i["id"] for i in data["images"] if i["file_name"] == image_name}
76
+ assert not any(a["category_id"] in category_ids and a["image_id"] not in image_ids
77
+ for a in data["annotations"]), "Feature name belongs to another image"
78
+ annotations = store.annotations_for(image_name)["annotations"]
79
+ annotations = [a for a in annotations if a["category"] != name]
80
+ annotations.append({"category": name, "bbox": [x, y, width, height]})
81
+ store.replace_annotations(image_name, annotations)
82
+ preview = Path("logs/template-preview")
83
+ preview.mkdir(parents=True, exist_ok=True)
84
+ assert cv2.imwrite(str(preview / f"{name}.png"), source[y:y+height, x:x+width])
85
+ ```
86
+
87
+ If intentionally moving an existing feature to another source image, remove its
88
+ old annotation while preserving the others, then add the replacement. If editing
89
+ COCO directly, preserve unique IDs, image/category references, dimensions, and
90
+ all unrelated entries. Review the annotation diff before export.
91
+
92
+ ## Generate runtime assets
93
+
94
+ Use the same function as the Template tab's Save action:
95
+
96
+ ```python
97
+ from ok.feature.FeatureSet import compress_copy_coco
98
+
99
+ generated_json = compress_copy_coco(
100
+ coco_json=str(store.coco_path),
101
+ target_folder=str(Path("assets").resolve()),
102
+ image_folder=str(store.folder),
103
+ generate_label_enmu=None,
104
+ )
105
+ print(generated_json)
106
+ ```
107
+
108
+ Choose the destination from the existing project config: normally `assets` for
109
+ a standalone app, or `ok_tasks/assets` for custom scripts. The main config uses
110
+ `template_matching.coco_feature_json`; preserve its other matching settings.
111
+ Custom task assets are merged automatically when the configured feature set
112
+ loads. Check for conflicting feature names in the main and custom datasets.
113
+
114
+ Before calling the exporter, resolve source and destination paths and ensure
115
+ they are separate, non-overlapping directories. The exporter deletes the target
116
+ `images/` tree and EVERY top-level `.json` file, so verify these contain only
117
+ generated template data and retain a recoverable copy of an existing export.
118
+ If unrelated assets share this destination, use a dedicated template subfolder
119
+ and update the relevant main config path; do not delete unrelated files. The
120
+ automatic custom-script merge specifically expects `ok_tasks/assets/coco_annotations.json`.
121
+
122
+ Validate all referenced source files, their recorded dimensions, category/image
123
+ IDs, and bounding boxes before generation. Missing sources can be skipped by
124
+ the exporter rather than producing a useful failure. Never call `compress_coco`
125
+ on the source `ok_templates` dataset; it is an in-place transformation. Keep
126
+ the prior generated COCO available when regenerating: the exporter uses it to
127
+ preserve packed image page assignments.
128
+
129
+ The optional keyword is spelled `generate_label_enmu` in the existing API. Its
130
+ value is a dotted module/class path, e.g. `ok_tasks.LabelEnum`, not a filename.
131
+ Use it only when the project uses enums; every category must be a valid Python
132
+ identifier and not a keyword. Verify the generated enum imports successfully.
133
+
134
+ ## Verify and use the feature
135
+
136
+ First load generated assets in a fresh `FeatureSet` and match the original
137
+ screenshot. This checks the full annotation/export/load path without a GUI:
138
+
139
+ ```python
140
+ from ok.feature.FeatureSet import FeatureSet
141
+
142
+ features = FeatureSet(False, generated_json, 0.002, 0.002,
143
+ default_threshold=0.95)
144
+ boxes = features.find_feature(source, name, threshold=0.95)
145
+ assert len(boxes) == 1, boxes
146
+ box = boxes[0]
147
+ assert abs(box.x - x) <= 1 and abs(box.y - y) <= 1
148
+ assert box.width == width and box.height == height
149
+ print(box)
150
+ ```
151
+
152
+ Also test an independent positive screenshot and a negative screenshot when
153
+ available, and relevant target sizes. A source-image self-match alone does not
154
+ prove recognition is robust. Use the project's actual threshold, preprocessing,
155
+ and anchor settings for representative verification. Keep evidence of what was
156
+ tested and what remains unverified.
157
+
158
+ In task code, use the existing methods:
159
+
160
+ ```python
161
+ box = self.find_one("settings_save", threshold=0.95)
162
+ assert box is not None, "Save button not found"
163
+ self.click_box(box)
164
+ # Observe and assert the resulting application state.
165
+ ```
166
+
167
+ `find_feature` returns a list; `find_one` returns a box or `None`. Pass `frame=`
168
+ to match a particular screenshot in task code. Named features search near their
169
+ annotated position by default. For a control that moves, provide an appropriate
170
+ `box=` or explicit horizontal/vertical variances. Variances are fractions of the
171
+ frame size, and zero inherits configured defaults. Diagnose capture size,
172
+ scaling, crop, and search area before lowering a threshold. `screenshot=True`
173
+ uses the existing screenshot worker and may write asynchronously; offline crop
174
+ previews should use synchronous `cv2.imwrite` as above.
175
+
176
+ After regeneration, cached features in a running process must be refreshed.
177
+ The GUI Save action already calls `feature_set.process_data()`. For agent edits,
178
+ after export finishes call `self.executor.feature_set.process_data()` from the
179
+ executor-owned task before matching (after capture initializes frame dimensions),
180
+ or restart the verified owned runtime. Do not regenerate files while a task is
181
+ reading them or reload from a competing thread.
182
+
183
+ Finish by reporting the original screenshot, source COCO, generated asset path,
184
+ feature names, task usage, and verification evidence. Keep originals and source
185
+ annotations for future edits; runtime code uses the generated assets.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: reload-tasks
3
+ description: Modify a third-party application's registered ok-script tasks in place and reload them through MCP, preserving registration and verifying replacements before testing.
4
+ ---
5
+
6
+ # Modify and Reload Existing Tasks
7
+
8
+ Prefer this workflow when changing an existing task in an application that uses ok-script. Edit the application's task source and reload its registered instance; keep new task files for new functionality. Library/server implementation changes are outside this skill's scope. Read [develop](../develop/SKILL.md) for target recovery, visual verification, and GUI validation, and [docs/mcp.md](../../../docs/mcp.md) for connection details.
9
+
10
+ ## Edit and reload
11
+
12
+ 1. Call `list_tasks()` to discover registered tasks. Use the returned `task_id` (the full module and class name) and absolute `file_path`; inspect the source and project config before editing.
13
+ 2. Wait for any active MCP run to reach `succeeded`, `failed`, or `cancelled`. A `stopping` run still owns the executor. Edit the existing source with local file tools.
14
+ 3. Call `reload_tasks(task_ids=[...])` with the affected IDs. Omit `task_ids` to reload all registered tasks and plugins. Prefer a selected reload when the change is local; tasks sharing its module and all tasks/pages in its plugin reload together.
15
+ 4. Poll `get_run_status(run_id)` until terminal. A successful reload returns replacement task descriptors in `result`; inspect `run.log` and `status.json` on failure, fix the source, and retry. A failed reload leaves existing tasks registered, so running them would still test the old code.
16
+ 5. Restore and verify the target's baseline, then exercise the updated task and assert application-level success. A reload alone does not execute `run()` or prove that automation works.
17
+
18
+ Reload requests acquire exclusive executor ownership, stopping scheduled one-time tasks and suspending triggers until completion. They do not interact with the target UI, so reset it before the next execution. A queued reload can be cancelled with `stop_task`; once its transaction starts, let it finish. A committed reload reports `succeeded` even if a stop was requested during the transaction.
19
+
20
+ ## Test the registered implementation
21
+
22
+ Use the actual GUI task card or a thin MCP test harness submitted with `run_task(file_path)`. The harness should call the registered task through `self.get_task_by_class(ExistingTask)`, reuse its recovery/verification methods, and invoke its implementation. Keep changes to task behavior in the existing task module rather than copying that behavior into the harness. The harness must still implement `reset_to_start()`, `verify_start_state()`, and `run()` as described in the development skill.
23
+
24
+ Calling a registered task method directly does not give that instance the scheduler's enabled/running flags or current-task context. Use the GUI Start action when the implementation depends on that lifecycle, or establish and restore the required context in the harness with `try/finally`. Assert an observable result so an early return cannot masquerade as success.
25
+
26
+ Debug mode does not automatically reload task files. Python callers can also queue `self.reload_tasks([ExistingTask])` or `self.reload_tasks()`; these run after the current task or debug call returns. Do not wait on that job from executor code or the GUI thread. During an MCP attempt, use the MCP reload tool after the attempt finishes, since the attempt holds exclusive ownership.
27
+
28
+ Only registered tasks are discovered or replaced. Add genuinely new tasks to the project config and restart the owned runtime to discover them. Task modules reload from current source; plugin helpers reload with their plugin. Helpers outside plugins remain cached: restart the owned runtime when those dependencies change. Preserve local failure evidence before restarting.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Modify and Reload Tasks"
3
+ short_description: "Edit existing tasks and reload them through MCP"
4
+ default_prompt: "Use $reload-tasks to modify an existing registered task, reload its source through MCP, and verify the updated implementation."
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: setup-env
3
+ description: Create or repair a third-party application's environment for the ok-script library, GUI, or MCP server using the application's dependency requirements.
4
+ ---
5
+
6
+ # Set Up the Local Environment
7
+
8
+ Work in the consuming application's directory and use its configured environment or `.venv`. Inspect its requirements, lockfile, supported Python versions, and installed packages before changing dependencies. Installing and using ok-script does not require a library source checkout.
9
+
10
+ ## Interpreter and dependencies
11
+
12
+ - Resolve an existing `.venv\Scripts\python.exe` before any Python command. Use an absolute path when commands change directories. Use `-m pip`, `-m pytest`, and `-m py_compile` through that interpreter.
13
+ - If a new environment is needed, create it with an available interpreter compatible with the application's requirements and its chosen ok-script release. Inspect installed distribution metadata with `importlib.metadata` when needed. Do not recreate a working environment just to install missing packages.
14
+ - Prefer the application's requirements or lockfile and preserve its chosen ok-script version. Select `default` for the normal vision/capture stack, `qt` for the desktop GUI, `mcp` for the local server, `adb` for Android targets, and `ocr` when required. A GUI application tested through MCP normally needs `default`, `qt`, and `mcp`. Install application test dependencies only when its tests need them.
15
+ - OpenCV is deliberately separate from these profiles. Inspect the installed `opencv-*` packages and choose exactly one compatible variant. Reuse the project's existing choice when suitable; do not install multiple variants that all provide `cv2`.
16
+
17
+ For an installed release, select the extras actually needed, for example:
18
+
19
+ ```powershell
20
+ $projectPy = (Resolve-Path .\.venv\Scripts\python.exe).Path
21
+ & $projectPy -m pip install 'ok-script[default,qt,mcp]'
22
+ ```
23
+
24
+ Run this from the application's root. Install the chosen OpenCV variant separately if it is absent.
25
+
26
+ If the application intentionally uses an existing editable library installation or `ok` source link, preserve that arrangement and install its required dependencies in the application's environment. A source link alone does not install dependencies. Modify the application's tasks and configuration; library source changes are outside this skill's scope.
27
+
28
+ Use the normal package index first. If downloads stall, a reachable alternate index can be supplied to the individual pip command; do not change persistent pip configuration as a side effect of setup.
29
+
30
+ ## Verify the environment
31
+
32
+ Run `& $projectPy -m pip check`. Smoke-test `import ok, cv2` and the selected optional stacks, and verify `ok.__file__` resolves to the intended checkout or installed package. For MCP, also check `import mcp`; for Qt, check `from PySide6 import QtCore` and `import qfluentwidgets`.
33
+
34
+ Run the application's launcher with its environment to catch runtime imports that dependency metadata alone cannot verify. Compile changed application scripts and run its existing tests when relevant.
35
+
36
+ Report the environment path, dependency profiles, OpenCV choice, and verification outcome. Continue with [setup-project](../setup-project/SKILL.md) when a target and launchers are also requested.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Set Up Local Environment"
3
+ short_description: "Prepare an application's ok-script environment"
4
+ default_prompt: "Use $setup-env to prepare my application's virtual environment and verify its installed ok-script dependencies."
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: setup-project
3
+ description: Set up a third-party automation application using ok-script, with its own environment, configuration, GUI and MCP launchers, and Windows shortcut.
4
+ ---
5
+
6
+ # Set Up a Local Automation Project
7
+
8
+ Work in the consuming application's directory at the user's requested location. Inspect an existing project before adding files. Use [setup-env](../setup-env/SKILL.md) when its environment needs preparation, and [docs/mcp.md](../../../docs/mcp.md) for current CLI and server configuration. Configure the application through the installed library's APIs; no ok-script source checkout is required.
9
+
10
+ ## Layout and source access
11
+
12
+ A playground can share one environment with a subfolder per target. Keep each target's config, task modules, assets, logs, screenshots, and entry points together. Target launchers must work when invoked by absolute path from another working directory: resolve paths from `__file__`, make the application's task modules importable, and set the working directory to the target folder.
13
+
14
+ Prefer the application's installed ok-script dependency. If the user explicitly requests a source link to an existing library installation, link `<project-root>\ok` to that checkout's `ok` directory and add the link's parent to `sys.path` before importing `ok`. Prefer a directory symbolic link; if Windows denies symlink privileges, use a directory junction. Verify existing destinations and resolved paths before replacing anything; never recursively delete through the link. This is dependency access, not permission to modify library code.
15
+
16
+ When obtaining a requested test application, record its source and checksum, verify the file type, and preserve existing downloads. Reuse an existing process only when its resolved executable path matches the intended target.
17
+
18
+ ## Application config
19
+
20
+ Build a project-local config using the actual target's executable, title, capture backend, and interaction backend. Resolve mutable paths under the target folder. A Windows GUI project commonly has:
21
+
22
+ ```python
23
+ from pathlib import Path
24
+
25
+ ROOT = Path(__file__).resolve().parent
26
+ config = {
27
+ 'version': '0.1.0',
28
+ 'gui_title': 'Automation Playground',
29
+ 'gui_icon': str(ROOT / 'assets' / 'app.png'),
30
+ 'gui': {'type': 'qt'},
31
+ 'debug': False,
32
+ 'config_folder': str(ROOT / 'configs'),
33
+ 'screenshots_folder': str(ROOT / 'screenshots'),
34
+ 'windows': {
35
+ 'exe': ['target.exe'],
36
+ 'title': 'Target Window',
37
+ 'capture_method': ['BitBlt'],
38
+ 'interaction': 'PostMessage',
39
+ 'start_exe': True,
40
+ 'calculate_pc_exe_path': str(ROOT / 'target.exe'),
41
+ },
42
+ 'onetime_tasks': [],
43
+ 'trigger_tasks': [],
44
+ 'mcp': {
45
+ 'enabled': False,
46
+ 'port': 8765,
47
+ 'artifact_directory': str(ROOT / 'logs' / 'mcp'),
48
+ },
49
+ }
50
+ ```
51
+
52
+ Adapt this example; ship an actual valid icon if configuring `gui_icon`. BitBlt and PostMessage are initial candidates, not proof of target compatibility. Register a completed task as `['task_module', 'Task']` in `onetime_tasks`, using an import path available to both launchers.
53
+
54
+ ## Separate launchers
55
+
56
+ - `start_gui.py` is the user entry point. Explicitly select the Qt GUI and disable MCP. Launch it with the project's `pythonw.exe`. Redirect absent stdout/stderr to a local startup log so startup errors remain observable without a console.
57
+ - `start_mcp.py` is the coding agent entry point. Enable MCP and normally run headless; support a configurable port when useful. If GUI-assisted development is needed, keep that entry point separate from the user launcher. The agent can start the process itself; do not require the user to open a console.
58
+ - Share path setup and target process startup in a launcher helper. Copy config before applying mode-specific overrides. Clean up the runtime on exit.
59
+ - A user `.lnk` targets the absolute venv `pythonw.exe`, passes a quoted absolute `start_gui.py` path, and sets the working directory and icon. A hidden `python.exe` console does not replace `pythonw.exe` for the user shortcut.
60
+
61
+ Starting a GUI replaces the registered console owner for the same working directory, closing that console's MCP server. Keep both launchers in the same target directory so project ownership matches. Close the GUI before starting a console development session. Never kill arbitrary Python processes to free a port; identify the owning project and PID.
62
+
63
+ ## Verify against the real target
64
+
65
+ Start the development launcher and inspect an MCP screenshot for a complete, current target image. Test reset, left/right clicks, keys, or other required input against observable UI changes. Prioritize PostMessage, checking background operation while the target is unfocused or covered and confirming that foreground focus and the cursor remain undisturbed. Do not infer minimized-window support from those checks.
66
+
67
+ If capture is cropped or stale, inspect backend behavior and DPI/coordinate scaling before changing recognition code. For a legacy application, a child-only `HIGHDPIAWARE` compatibility environment may help; apply it only when verified, rather than globally changing Windows settings.
68
+
69
+ Launch the actual user shortcut: confirm the GUI opens without a console or MCP listener, the task appears with a useful name, and its Start action runs successfully. See [develop](../develop/SKILL.md) for task lifecycle and retry behavior. Report concrete launcher paths and the interaction/capture behavior that was tested.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Set Up Automation Project"
3
+ short_description: "Create a local GUI and MCP automation project"
4
+ default_prompt: "Use $setup-project to configure a local automation target with separate user GUI and agent MCP launchers."
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: use-venv
3
+ description: Select the consuming application's virtual environment for Python commands, task execution, tests, and package tools when using ok-script or its MCP server.
4
+ ---
5
+
6
+ # Use the Application's Virtual Environment
7
+
8
+ Resolve the third-party application's root and use its virtual environment for Python commands, launchers, and tests. The directory containing this skill or the installed `ok` package is not the application root.
9
+
10
+ Honor an explicitly configured environment; otherwise prefer the application's `.venv`. Use an absolute interpreter path when changing directories, and preserve the application's dependency and test-runner conventions.
11
+
12
+ ## PowerShell
13
+
14
+ From the application root, resolve the interpreter:
15
+
16
+ ```powershell
17
+ $py = if (Test-Path .\.venv\Scripts\python.exe) { ".\.venv\Scripts\python.exe" } else { "python" }
18
+ ```
19
+
20
+ Then run commands through that interpreter:
21
+
22
+ ```powershell
23
+ & $py -m py_compile src\tasks\MyTask.py
24
+ & $py -m pytest tests
25
+ & $py .\start_mcp.py
26
+ & $py -m pip install -r requirements.txt
27
+ ```
28
+
29
+ Do not call global `python`, `pip`, or `pytest` directly when `.venv` exists. Use `& $py`, `& $py -m pip`, and `& $py -m pytest` instead.
30
+
31
+ If the environment is absent or dependencies are missing, follow [setup-env](../setup-env/SKILL.md). Linking the `ok` source folder does not install its dependencies into another project's environment.
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: write-test
3
+ description: Write and run tests for a third-party application's ok-script tasks using its screenshot fixtures, TaskTestCase, and isolated mocks.
4
+ ---
5
+
6
+ # Write Automation Tests
7
+
8
+ Use this skill in the consuming application's project to test its task behavior, recognition, recovery, and settings. Use the installed ok-script test APIs and the application's own config, fixtures, and runner. No library source checkout or separate reference project is required; developing the library's test suite is outside this skill's scope.
9
+
10
+ ## Choose the test boundary
11
+
12
+ Read the affected implementation, nearby tests, and project test runner before writing a test. Choose the smallest boundary that exercises the real behavior:
13
+
14
+ | Behavior | Pattern |
15
+ | --- | --- |
16
+ | Recognition from a saved screen | `TaskTestCase`, the application's real task, `set_image()` |
17
+ | Template geometry, resolution, or anchors | Real `FeatureSet` with application assets and image arrays |
18
+ | Task decisions and action ordering | Lightweight application task instance with mocked input |
19
+ | Retry loops, task chaining, or counters | Real task methods with mocked dependencies and bounded scenarios |
20
+ | Persistence and cleanup on failures | Temporary application settings and scoped patches |
21
+
22
+ Prefer assertions about application behavior over source-text checks, print-only diagnostics, or real-time sleeps. Do not add tests that only mirror implementation details or wording.
23
+
24
+ ## Screenshot tests
25
+
26
+ Import `TaskTestCase` from `ok.test.TaskTestCase`; set class attributes `task_class` and `config`. Use the project's real config and templates. Copy config values that the harness will mutate so other tests do not inherit those changes; a shallow copy only isolates top-level keys.
27
+
28
+ The current harness initializes one task per test class, replaces capture with `ImageCaptureMethod`, and uses `DoNothingInteraction`. `set_image(path)` advances the frame and checks template sizing; `set_images(*paths)` installs a sequence and advances its first frame. Read the capture implementation when testing frame progression rather than assuming repeated reads advance it.
29
+
30
+ - Store reproducible screenshots under the target project's `tests/images/`, or reuse an existing tracked `ok_templates` source when appropriate. Confirm each fixture exists and loads.
31
+ - Load the image before calling the recognition method. Exercise real recognition rather than mocking the method being tested.
32
+ - Assert the detected state, value, feature name, confidence, or box geometry as appropriate. Include an absent or negative case when it distinguishes the regression.
33
+ - For scaling bugs, use representative resolutions and aspect ratios with `subTest`; preserve the intended center/right anchors and allow a justified pixel tolerance. Include positive matches and blank-frame negatives when relevant.
34
+ - Reset relevant mutable task state before each scenario. The task is shared across methods; base `tearDown()` only calls `reset_scene()`. Use scoped patches for replaced methods, and call the base lifecycle methods when overriding them.
35
+ - Do not treat no-op input as proof that an in-game click worked. Test action intent with mocks; use the [develop skill](../develop/SKILL.md) when actual GUI/MCP interaction is part of the request.
36
+ - For fixture annotation or named feature creation, follow [generate-templates](../generate-templates/SKILL.md).
37
+
38
+ ## Isolated logic tests
39
+
40
+ Use `unittest.TestCase` and `unittest.mock` for branches that do not require capture, OCR, or the runtime. Construct normally when inexpensive. Where initialization starts the runtime, `TaskClass.__new__(TaskClass)` can isolate a method, provided the test explicitly initializes every field that method uses. A small fake binding a production method is also appropriate for orchestration tests.
41
+
42
+ - Mock external effects such as input, sleeps, capture, and unrelated task dispatch. Keep the production decision or orchestration method real.
43
+ - Use `side_effect` for successive detections or failures. Assert return values and state changes; assert exact action order only when order is part of the behavior, such as checkbox before confirmation.
44
+ - Check that absent UI or early exits produce no clicks or other unintended actions with `assert_not_called()`.
45
+ - Make retry cases finite and exercise the relevant termination or recovery behavior. Patch the clock in the module where it is used when elapsed time affects the result.
46
+ - Use context-managed patches or `addCleanup()` so changes do not leak. Use temporary directories for persistence tests instead of real user config.
47
+ - Explain the regression with a brief concrete comment when the expected value is otherwise surprising.
48
+
49
+ For a confirmation dialog, mock `find_one`, `click`, and `sleep`, supply a checkbox and confirmation button as detections, then invoke the application's real dialog method. Assert that it clicks the checkbox before confirming. A separate absent-dialog case should return without clicks.
50
+
51
+ ## Run and verify
52
+
53
+ Follow [use-venv](../use_venv/SKILL.md). Run from the application's root using its environment so task imports and relative fixture paths resolve. Install its test dependencies through its normal requirements or lockfile when needed.
54
+
55
+ Prefer the application's existing test runner. For a pytest application, a focused invocation is:
56
+
57
+ ```powershell
58
+ # Working directory: the application's root.
59
+ $py = if (Test-Path .\.venv\Scripts\python.exe) { ".\.venv\Scripts\python.exe" } else { "python" }
60
+ & $py -m pytest tests/test_settings_task.py -q
61
+ ```
62
+
63
+ Replace the example filename with the application's affected test. For an isolated unittest module without a custom runner, use `& $py -m unittest discover -s tests -p 'TestSettingsTask.py' -v`.
64
+
65
+ Check the application's test naming patterns: default discovery can miss uppercase `Test*.py` filenames. Preserve any process isolation used by its runner. Runtime-backed `TaskTestCase` tests may share a global library runtime; run classes in separate processes when repeated initialization would reuse a destroyed runtime.
66
+
67
+ Run the changed test and relevant neighboring cases. Verify that tests were actually collected and inspect exit codes; syntax checks alone do not establish a pass. For a regression, confirm that the assertions distinguish the old failure when practical. Report the test command, outcome, and any missing fixture or dependency that prevented execution. If dependencies need repair, follow [setup-env](../setup-env/SKILL.md).
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "Write Automation Tests"
3
+ short_description: "Write screenshot and isolated automation regression tests"
@@ -1,4 +1,7 @@
1
1
  recursive-include ok *
2
+ recursive-include .agents/skills *
3
+ include docs/mcp.md
4
+ include examples/mcp_observe.py
2
5
  global-exclude *.pyc
3
6
  global-exclude *.log
4
7
  global-exclude *.log.*