ok-script 2.0.16__tar.gz → 2.0.18__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 (395) hide show
  1. ok_script-2.0.18/.agents/skills/setup-env/SKILL.md +48 -0
  2. {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/setup-project/SKILL.md +40 -7
  3. {ok_script-2.0.16 → ok_script-2.0.18}/MANIFEST.in +1 -0
  4. {ok_script-2.0.16/ok_script.egg-info → ok_script-2.0.18}/PKG-INFO +13 -5
  5. {ok_script-2.0.16 → ok_script-2.0.18}/README.md +10 -2
  6. ok_script-2.0.18/docs/agent-setup.md +94 -0
  7. {ok_script-2.0.16 → ok_script-2.0.18}/docs/mcp.md +9 -4
  8. {ok_script-2.0.16 → ok_script-2.0.18}/ok/__init__.py +3 -2
  9. ok_script-2.0.18/ok/assets/default-icon.png +0 -0
  10. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/mcp_server.py +3 -3
  11. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/ui_config.py +8 -0
  12. {ok_script-2.0.16 → ok_script-2.0.18/ok_script.egg-info}/PKG-INFO +13 -5
  13. {ok_script-2.0.16 → ok_script-2.0.18}/ok_script.egg-info/SOURCES.txt +2 -0
  14. {ok_script-2.0.16 → ok_script-2.0.18}/ok_script.egg-info/requires.txt +1 -3
  15. {ok_script-2.0.16 → ok_script-2.0.18}/pyproject.toml +5 -6
  16. {ok_script-2.0.16 → ok_script-2.0.18}/setup.py +2 -1
  17. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_mcp_server.py +2 -2
  18. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_mcp_setting.py +2 -2
  19. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_package_metadata.py +2 -1
  20. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_skills.py +1 -0
  21. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_ui_config.py +19 -1
  22. ok_script-2.0.16/.agents/skills/setup-env/SKILL.md +0 -36
  23. {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/develop/SKILL.md +0 -0
  24. {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/develop/agents/openai.yaml +0 -0
  25. {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/develop/references/windows-input.md +0 -0
  26. {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/generate-templates/SKILL.md +0 -0
  27. {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/reload-tasks/SKILL.md +0 -0
  28. {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/reload-tasks/agents/openai.yaml +0 -0
  29. {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/setup-env/agents/openai.yaml +0 -0
  30. {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/setup-project/agents/openai.yaml +0 -0
  31. {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/use_venv/SKILL.md +0 -0
  32. {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/write-test/SKILL.md +0 -0
  33. {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/write-test/agents/openai.yaml +0 -0
  34. {ok_script-2.0.16 → ok_script-2.0.18}/LICENSE.txt +0 -0
  35. {ok_script-2.0.16 → ok_script-2.0.18}/diagnostics/qq_trace.py +0 -0
  36. {ok_script-2.0.16 → ok_script-2.0.18}/docs/feature-crops.md +0 -0
  37. {ok_script-2.0.16 → ok_script-2.0.18}/examples/mcp_observe.py +0 -0
  38. {ok_script-2.0.16 → ok_script-2.0.18}/ok/__main__.py +0 -0
  39. {ok_script-2.0.16 → ok_script-2.0.18}/ok/alas/__init__.py +0 -0
  40. {ok_script-2.0.16 → ok_script-2.0.18}/ok/alas/emulator_base.py +0 -0
  41. {ok_script-2.0.16 → ok_script-2.0.18}/ok/alas/emulator_windows.py +0 -0
  42. {ok_script-2.0.16 → ok_script-2.0.18}/ok/alas/platform_windows.py +0 -0
  43. {ok_script-2.0.16 → ok_script-2.0.18}/ok/alas/utils.py +0 -0
  44. {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/__init__.py +0 -0
  45. {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/adb/__init__.py +0 -0
  46. {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/adb/deep.py +0 -0
  47. {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/adb/minitouch.py +0 -0
  48. {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/adb/nemu_ipc.py +0 -0
  49. {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/adb/nemu_utils.py +0 -0
  50. {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/adb/pool.py +0 -0
  51. {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/adb/timer.py +0 -0
  52. {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/adb/util.py +0 -0
  53. {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/windows/__init__.py +0 -0
  54. {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/windows/d3d11.py +0 -0
  55. {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/windows/dump.py +0 -0
  56. {ok_script-2.0.16 → ok_script-2.0.18}/ok/cli.py +0 -0
  57. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/__init__.py +0 -0
  58. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/capture_labels.py +0 -0
  59. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/code_runner.py +0 -0
  60. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/config_schema.py +0 -0
  61. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/downloads.py +0 -0
  62. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/events.py +0 -0
  63. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/icons.py +0 -0
  64. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/mcp_runner.py +0 -0
  65. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/notifications.py +0 -0
  66. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/plugin_staging.py +0 -0
  67. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/plugins.py +0 -0
  68. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/screenshot.py +0 -0
  69. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/script_editing.py +0 -0
  70. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/script_packager.py +0 -0
  71. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/script_templates.py +0 -0
  72. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/skills.py +0 -0
  73. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/start_controller.py +0 -0
  74. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/task_manager.py +0 -0
  75. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/template_store.py +0 -0
  76. {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/translation.py +0 -0
  77. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/DeviceManager.py +0 -0
  78. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/__init__.py +0 -0
  79. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture.py +0 -0
  80. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/__init__.py +0 -0
  81. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/adb.py +0 -0
  82. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/base.py +0 -0
  83. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/bitblt.py +0 -0
  84. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/bitblt_utils.py +0 -0
  85. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/browser.py +0 -0
  86. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/desktop_duplication.py +0 -0
  87. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/hwnd_window.py +0 -0
  88. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/image.py +0 -0
  89. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/nemu_ipc.py +0 -0
  90. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/types.py +0 -0
  91. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/update.py +0 -0
  92. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/windows_graphics.py +0 -0
  93. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/windows_graphics_hdr.py +0 -0
  94. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction.py +0 -0
  95. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/__init__.py +0 -0
  96. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/adb.py +0 -0
  97. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/base.py +0 -0
  98. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/browser.py +0 -0
  99. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/do_nothing.py +0 -0
  100. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/foreground_post_message.py +0 -0
  101. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/genshin.py +0 -0
  102. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/keys.py +0 -0
  103. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/post_message.py +0 -0
  104. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/pydirect.py +0 -0
  105. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/pynput.py +0 -0
  106. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/swipe.py +0 -0
  107. {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/intercation.py +0 -0
  108. {ok_script-2.0.16 → ok_script-2.0.18}/ok/feature/Box.py +0 -0
  109. {ok_script-2.0.16 → ok_script-2.0.18}/ok/feature/Feature.py +0 -0
  110. {ok_script-2.0.16 → ok_script-2.0.18}/ok/feature/FeatureSet.py +0 -0
  111. {ok_script-2.0.16 → ok_script-2.0.18}/ok/feature/__init__.py +0 -0
  112. {ok_script-2.0.16 → ok_script-2.0.18}/ok/gui/__init__.py +0 -0
  113. {ok_script-2.0.16 → ok_script-2.0.18}/ok/gui/util/pyappify_startup.py +0 -0
  114. {ok_script-2.0.16 → ok_script-2.0.18}/ok/notification/__init__.py +0 -0
  115. {ok_script-2.0.16 → ok_script-2.0.18}/ok/notification/manager.py +0 -0
  116. {ok_script-2.0.16 → ok_script-2.0.18}/ok/notification/messenger_images.py +0 -0
  117. {ok_script-2.0.16 → ok_script-2.0.18}/ok/notification/pipeline.py +0 -0
  118. {ok_script-2.0.16 → ok_script-2.0.18}/ok/notification/ppocr.py +0 -0
  119. {ok_script-2.0.16 → ok_script-2.0.18}/ok/notification/providers.py +0 -0
  120. {ok_script-2.0.16 → ok_script-2.0.18}/ok/notification/system.py +0 -0
  121. {ok_script-2.0.16 → ok_script-2.0.18}/ok/notification/windows_messenger.py +0 -0
  122. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ocr/__init__.py +0 -0
  123. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ocr/download_paddle_model.py +0 -0
  124. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Foundation/Collections.py +0 -0
  125. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Foundation/__init__.py +0 -0
  126. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Globalization/__init__.py +0 -0
  127. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Graphics/Capture/__init__.py +0 -0
  128. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Graphics/DirectX/Direct3D11/__init__.py +0 -0
  129. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Graphics/DirectX/__init__.py +0 -0
  130. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Graphics/Imaging/__init__.py +0 -0
  131. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Graphics/__init__.py +0 -0
  132. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Media/Ocr/__init__.py +0 -0
  133. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Media/__init__.py +0 -0
  134. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Security/Cryptography/__init__.py +0 -0
  135. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Security/__init__.py +0 -0
  136. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Storage/Streams/__init__.py +0 -0
  137. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Storage/__init__.py +0 -0
  138. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/UI/ViewManagement/__init__.py +0 -0
  139. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/UI/__init__.py +0 -0
  140. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/__init__.py +0 -0
  141. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/__init__.py +0 -0
  142. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/delegate.py +0 -0
  143. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/export.py +0 -0
  144. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/idldsl.py +0 -0
  145. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/inspectable.py +0 -0
  146. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/roapi.py +0 -0
  147. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/types.py +0 -0
  148. {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/winstring.py +0 -0
  149. {ok_script-2.0.16 → ok_script-2.0.18}/ok/task/DiagnosisTask.py +0 -0
  150. {ok_script-2.0.16 → ok_script-2.0.18}/ok/task/TaskExecutor.py +0 -0
  151. {ok_script-2.0.16 → ok_script-2.0.18}/ok/task/__init__.py +0 -0
  152. {ok_script-2.0.16 → ok_script-2.0.18}/ok/task/exceptions.py +0 -0
  153. {ok_script-2.0.16 → ok_script-2.0.18}/ok/task/task.py +0 -0
  154. {ok_script-2.0.16 → ok_script-2.0.18}/ok/test/OKTestRunner.py +0 -0
  155. {ok_script-2.0.16 → ok_script-2.0.18}/ok/test/RunTests.py +0 -0
  156. {ok_script-2.0.16 → ok_script-2.0.18}/ok/test/TaskTestCase.py +0 -0
  157. {ok_script-2.0.16 → ok_script-2.0.18}/ok/test/__init__.py +0 -0
  158. {ok_script-2.0.16 → ok_script-2.0.18}/ok/third_party/__init__.py +0 -0
  159. {ok_script-2.0.16 → ok_script-2.0.18}/ok/third_party/paperclip.py +0 -0
  160. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/__init__.py +0 -0
  161. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/overlay/__init__.py +0 -0
  162. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/overlay/win32_gdi.py +0 -0
  163. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/Communicate.py +0 -0
  164. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/MainWindow.py +0 -0
  165. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/MessageWindow.py +0 -0
  166. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/StartController.py +0 -0
  167. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/TabTitles.py +0 -0
  168. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/__init__.py +0 -0
  169. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/about/AboutTab.py +0 -0
  170. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/about/HttpTextEdit.py +0 -0
  171. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/about/LinksBar.py +0 -0
  172. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/about/ProjectCard.py +0 -0
  173. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/about/UpdateCard.py +0 -0
  174. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/about/VersionCard.py +0 -0
  175. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/about/__init__.py +0 -0
  176. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/common/OKIcon.py +0 -0
  177. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/common/__init__.py +0 -0
  178. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/common/accent_color.py +0 -0
  179. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/common/config.py +0 -0
  180. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/common/design_system.py +0 -0
  181. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/common/icons.py +0 -0
  182. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/common/style_sheet.py +0 -0
  183. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/debug/DebugTab.py +0 -0
  184. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/debug/JobControls.py +0 -0
  185. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/debug/OverlayWidget.py +0 -0
  186. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/debug/RunCodeTab.py +0 -0
  187. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/debug/Screenshot.py +0 -0
  188. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/debug/__init__.py +0 -0
  189. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/events.py +0 -0
  190. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/GettextTranslator.py +0 -0
  191. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/__init__.py +0 -0
  192. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/en_US.qm +0 -0
  193. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/en_US.ts +0 -0
  194. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/es_ES.qm +0 -0
  195. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/es_ES.ts +0 -0
  196. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/ja_JP.qm +0 -0
  197. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/ja_JP.ts +0 -0
  198. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/ko_KR.qm +0 -0
  199. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/ko_KR.ts +0 -0
  200. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/path.py +0 -0
  201. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/update.py +0 -0
  202. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/zh_CN.qm +0 -0
  203. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/zh_CN.ts +0 -0
  204. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/zh_TW.qm +0 -0
  205. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/zh_TW.ts +0 -0
  206. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/overlay/OverlayWindow.py +0 -0
  207. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/overlay/__init__.py +0 -0
  208. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/plugins/PluginTab.py +0 -0
  209. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/plugins/__init__.py +0 -0
  210. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/plugins/imported_tabs.py +0 -0
  211. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/__init__.py +0 -0
  212. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/dark/card.qss +0 -0
  213. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/dark/discord.svg +0 -0
  214. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/dark/heart.svg +0 -0
  215. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/dark/message_window.qss +0 -0
  216. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/dark/setting_interface.qss +0 -0
  217. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/dark/status_bar.qss +0 -0
  218. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/dark/stop.svg +0 -0
  219. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/dark/tab.qss +0 -0
  220. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/light/card.qss +0 -0
  221. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/light/discord.svg +0 -0
  222. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/light/heart.svg +0 -0
  223. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/light/message_window.qss +0 -0
  224. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/light/setting_interface.qss +0 -0
  225. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/light/status_bar.qss +0 -0
  226. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/light/stop.svg +0 -0
  227. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/light/tab.qss +0 -0
  228. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qt.qrc +0 -0
  229. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/resources.py +0 -0
  230. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/settings/GlobalConfigCard.py +0 -0
  231. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/settings/GlobalConfigTab.py +0 -0
  232. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/settings/SettingTab.py +0 -0
  233. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/settings/__init__.py +0 -0
  234. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/start/LogWindow.py +0 -0
  235. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/start/SelectCaptureListView.py +0 -0
  236. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/start/SelectInteractionListView.py +0 -0
  237. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/start/StartCard.py +0 -0
  238. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/start/StartTab.py +0 -0
  239. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/start/__init__.py +0 -0
  240. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/ConfigCard.py +0 -0
  241. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/ConfigItemFactory.py +0 -0
  242. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/ConfigLabelAndWidget.py +0 -0
  243. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/EditTaskTab.py +0 -0
  244. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndButtons.py +0 -0
  245. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndDoubleSpinBox.py +0 -0
  246. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndDropDown.py +0 -0
  247. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndFileSelector.py +0 -0
  248. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndGlobal.py +0 -0
  249. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndLineEdit.py +0 -0
  250. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndList.py +0 -0
  251. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndMcpServer.py +0 -0
  252. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndMultiSelection.py +0 -0
  253. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndSpinBox.py +0 -0
  254. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndSwitchButton.py +0 -0
  255. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndTextEdit.py +0 -0
  256. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndWidget.py +0 -0
  257. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/MarkUpWindow.py +0 -0
  258. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/ModifyListDialog.py +0 -0
  259. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/ModifyListItem.py +0 -0
  260. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/OneTimeTaskTab.py +0 -0
  261. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/PythonHighlighter.py +0 -0
  262. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/RecordScript.py +0 -0
  263. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/ScheduleTaskTab.py +0 -0
  264. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/ScriptPackager.py +0 -0
  265. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/StartButton.py +0 -0
  266. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/TaskCard.py +0 -0
  267. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/TaskManger.py +0 -0
  268. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/TaskOpButton.py +0 -0
  269. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/TaskTab.py +0 -0
  270. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/TemplateFactory.py +0 -0
  271. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/TemplateTab.py +0 -0
  272. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/TooltipTableWidget.py +0 -0
  273. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/TriggerTaskTab.py +0 -0
  274. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/__init__.py +0 -0
  275. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/schedule_index_sync.py +0 -0
  276. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/util/Alert.py +0 -0
  277. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/util/InitWorker.py +0 -0
  278. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/util/__init__.py +0 -0
  279. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/util/app.py +0 -0
  280. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/util/download.py +0 -0
  281. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/util/pip_util.py +0 -0
  282. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/util/pyappify_startup.py +0 -0
  283. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/util/touch_scroll.py +0 -0
  284. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/util/windows_thumbnail.py +0 -0
  285. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/BaseLoading.py +0 -0
  286. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/BaseWindow.py +0 -0
  287. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/Card.py +0 -0
  288. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/CustomTab.py +0 -0
  289. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/EmptyCard.py +0 -0
  290. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/ExpandCardLayout.py +0 -0
  291. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/FlowLayout.py +0 -0
  292. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/FramelessDialog.py +0 -0
  293. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/ImageWidget.py +0 -0
  294. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/ImportWarningDialog.py +0 -0
  295. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/ListTableWidgetItem.py +0 -0
  296. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/NumericTableWidgetItem.py +0 -0
  297. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/OkCompactSpinBox.py +0 -0
  298. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/SortingTableWidgetItem.py +0 -0
  299. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/StartLoadingDialog.py +0 -0
  300. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/StatusBar.py +0 -0
  301. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/Tab.py +0 -0
  302. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/TabWidget.py +0 -0
  303. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/UpdateConfigWidgetItem.py +0 -0
  304. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/WidgetWithVLabel.py +0 -0
  305. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/YesNonWidgetItem.py +0 -0
  306. {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/__init__.py +0 -0
  307. {ok_script-2.0.16 → ok_script-2.0.18}/ok/update/__init__.py +0 -0
  308. {ok_script-2.0.16 → ok_script-2.0.18}/ok/update/copy_ok_folder.py +0 -0
  309. {ok_script-2.0.16 → ok_script-2.0.18}/ok/update/inline_ok_requirements.py +0 -0
  310. {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/Analytics.py +0 -0
  311. {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/GlobalConfig.py +0 -0
  312. {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/__init__.py +0 -0
  313. {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/blur.py +0 -0
  314. {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/clazz.py +0 -0
  315. {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/collection.py +0 -0
  316. {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/color.py +0 -0
  317. {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/config.py +0 -0
  318. {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/explorer.py +0 -0
  319. {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/file.py +0 -0
  320. {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/gpu_driver_settings.py +0 -0
  321. {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/handler.py +0 -0
  322. {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/i18n.py +0 -0
  323. {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/logger.py +0 -0
  324. {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/partial_sync_repo.py +0 -0
  325. {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/print_hwnd.py +0 -0
  326. {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/process.py +0 -0
  327. {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/version.py +0 -0
  328. {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/window.py +0 -0
  329. {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/windows_schedule.py +0 -0
  330. {ok_script-2.0.16 → ok_script-2.0.18}/ok_script.egg-info/dependency_links.txt +0 -0
  331. {ok_script-2.0.16 → ok_script-2.0.18}/ok_script.egg-info/entry_points.txt +0 -0
  332. {ok_script-2.0.16 → ok_script-2.0.18}/ok_script.egg-info/not-zip-safe +0 -0
  333. {ok_script-2.0.16 → ok_script-2.0.18}/ok_script.egg-info/top_level.txt +0 -0
  334. {ok_script-2.0.16 → ok_script-2.0.18}/setup.cfg +0 -0
  335. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_accent_color.py +0 -0
  336. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_app.py +0 -0
  337. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_base_interaction.py +0 -0
  338. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_blur.py +0 -0
  339. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_box.py +0 -0
  340. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_capture_update.py +0 -0
  341. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_cli.py +0 -0
  342. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_config_card.py +0 -0
  343. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_core_events.py +0 -0
  344. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_core_ui_services.py +0 -0
  345. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_debug_job_controls.py +0 -0
  346. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_device_manager.py +0 -0
  347. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_executor_jobs.py +0 -0
  348. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_expand_card_layout.py +0 -0
  349. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_explorer.py +0 -0
  350. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_global_config.py +0 -0
  351. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_gpu_driver_settings.py +0 -0
  352. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_handler.py +0 -0
  353. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_headless_imports.py +0 -0
  354. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_inline_ok_requirements.py +0 -0
  355. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_logger.py +0 -0
  356. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_main_window_notifications.py +0 -0
  357. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_main_window_startup_tab.py +0 -0
  358. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_main_window_system_theme.py +0 -0
  359. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_mcp_runner.py +0 -0
  360. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_missing_frame.py +0 -0
  361. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_navigation_state.py +0 -0
  362. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_nemu_ipc_capture.py +0 -0
  363. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_notifications.py +0 -0
  364. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_ok_mutex.py +0 -0
  365. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_overlay_custom_draw.py +0 -0
  366. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_overlay_lifecycle.py +0 -0
  367. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_plugin_staging.py +0 -0
  368. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_plugin_tabs.py +0 -0
  369. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_plugins.py +0 -0
  370. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_process.py +0 -0
  371. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_process_mutex.py +0 -0
  372. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_pyappify_startup_update.py +0 -0
  373. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_qt_events.py +0 -0
  374. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_qt_legacy_imports.py +0 -0
  375. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_qt_page_layout.py +0 -0
  376. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_runtime_startup.py +0 -0
  377. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_schedule_startup.py +0 -0
  378. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_schedule_task_index_sync.py +0 -0
  379. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_screenshot_naming.py +0 -0
  380. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_screenshot_rendering.py +0 -0
  381. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_start_controller.py +0 -0
  382. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_start_tab_overlay.py +0 -0
  383. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_task_executor_queue.py +0 -0
  384. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_task_reloading.py +0 -0
  385. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_task_ui.py +0 -0
  386. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_template_compression.py +0 -0
  387. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_template_generation.py +0 -0
  388. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_template_tab.py +0 -0
  389. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_touch_scroll.py +0 -0
  390. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_translation_fallback.py +0 -0
  391. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_version.py +0 -0
  392. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_windows_graphics_capture.py +0 -0
  393. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_windows_graphics_hdr.py +0 -0
  394. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_windows_schedule_target_parse.py +0 -0
  395. {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_windows_schedule_xml.py +0 -0
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: setup-env
3
+ description: Install the ok-script Python package and create or repair a consuming application's virtual environment, including dependencies for its GUI or MCP server.
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
+ Use this skill for requests such as "install ok-script and set up its environment", even before an MCP server exists. Read this file directly from the repository or installed package; starting MCP is not a prerequisite. After installation and verification, follow the project-creation handoff below.
11
+
12
+ ## Interpreter and dependencies
13
+
14
+ - 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.
15
+ - If a new environment is needed, create it with an available interpreter compatible with the application's requirements and its chosen ok-script release. Current releases require Windows and Python 3.11 or later. Inspect installed distribution metadata with `importlib.metadata` when needed. Do not recreate a working environment just to install missing packages.
16
+ - 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, `adb` for Android targets, and `ocr` when required. A GUI application tested through MCP normally needs `default` and `qt`. MCP is a required dependency starting in ok-script 2.0.17; older pinned releases may still need their `mcp` extra. Install application test dependencies only when its tests need them.
17
+ - 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`.
18
+
19
+ For an installed release, select the extras actually needed, for example:
20
+
21
+ ```powershell
22
+ $projectPy = (Resolve-Path .\.venv\Scripts\python.exe).Path
23
+ & $projectPy -m pip install 'ok-script[default,qt]'
24
+ ```
25
+
26
+ Run this from the application's root. Install the chosen OpenCV variant separately if it is absent.
27
+
28
+ Record the selected ok-script version or constraint, extras, and OpenCV variant in the application's existing dependency manifest or lockfile using its package manager. Keep setup reproducible without replacing unrelated dependencies.
29
+
30
+ 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.
31
+
32
+ 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.
33
+
34
+ ## Verify the environment
35
+
36
+ Run `& $projectPy -m pip check`. Smoke-test `import ok, cv2, mcp` and the selected optional stacks, and verify `ok.__file__` resolves to the intended checkout or installed package. For Qt, check `from PySide6 import QtCore` and `import qfluentwidgets`.
37
+
38
+ If the application already has a launcher, run it with its environment to catch runtime imports that dependency metadata alone cannot verify. Compile changed application scripts and run its existing tests when relevant.
39
+
40
+ Report the environment path, dependency profiles, OpenCV choice, and verification outcome.
41
+
42
+ ## Offer to create a project
43
+
44
+ After a successful initial installation, ask whether the user wants to create an automation project and which game or app it should target. For example: "ok-script is installed. Would you like to create an automation project now? If so, which game or app, and is it a Windows app or an Android device/emulator?" Wait for the answer before creating a project that has not already been requested.
45
+
46
+ If project creation was already requested, continue with [setup-project](../setup-project/SKILL.md) and ask only for missing target/configuration details. That skill creates each project in its own subfolder with its own config and start scripts. Reuse the environment just prepared when compatible, adding any target-specific dependencies that become necessary.
47
+
48
+ Do not repeat this offer when repairing an existing project's environment, returning to an ongoing `setup-project` workflow, or when the user has explicitly declined project creation. An installation request by itself should receive the offer; a running MCP server is not required for this conversation.
@@ -1,15 +1,49 @@
1
1
  ---
2
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.
3
+ description: Create or configure an ok-script automation project, collect missing game or app details, and give each project its own subfolder, config, GUI and MCP start scripts, and Windows shortcut.
4
4
  ---
5
5
 
6
6
  # Set Up a Local Automation Project
7
7
 
8
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
9
 
10
+ ## Collect the target details
11
+
12
+ When following an installation-only request, first ask whether the user wants a project, as described in `setup-env`. If they already requested a project, proceed without asking for the same confirmation again. Reuse details from the request and existing project, and ask a short grouped question for missing information:
13
+
14
+ - Which game or app should this project automate, and is it a Windows application or an Android device/emulator?
15
+ - For Windows, which installed executable or running window is the target? Inspect running processes and windows when possible; ask for the executable path or window choice when the target cannot be identified unambiguously. Determine whether the launcher should open the target or attach to an already-running instance. Automatic startup requires its actual launch path or command.
16
+ - For Android, which device or emulator and which app should be targeted? Inspect available devices and the installed library's configuration before asking for identifiers the agent can discover itself. Ask the user to choose when multiple targets match.
17
+
18
+ Use a sensible project folder name derived from the app unless the user supplies one. Use the current workspace as the parent unless another location was requested. Ask about additional requirements, such as background operation, only when they affect the requested setup. Select and verify capture/input backends using the installed APIs; the user need not know their technical names.
19
+
20
+ Wait for essential target details before writing target-dependent configuration. Do not use example executable names or window titles as if they were verified. If environment setup is still needed, it can proceed while the target question is pending.
21
+
10
22
  ## Layout and source access
11
23
 
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.
24
+ Create each new automation project in its own named subfolder under the workspace. Each project must have its own `config.py`, `start_gui.py`, and `start_mcp.py` inside that subfolder. Keep its task modules, assets, mutable configuration, logs, and screenshots there too. For example:
25
+
26
+ ```text
27
+ workspace/
28
+ .venv/
29
+ my-game/
30
+ config.py
31
+ start_gui.py
32
+ start_mcp.py
33
+ tasks/
34
+ assets/
35
+ configs/
36
+ logs/
37
+ screenshots/
38
+ another-app/
39
+ config.py
40
+ start_gui.py
41
+ start_mcp.py
42
+ ```
43
+
44
+ Create supporting directories as needed. Reuse a matching existing project folder; if the current directory is already that project's folder, edit it in place rather than nesting another copy. Keep separate projects' config and launch scripts separate, even when they target the same app.
45
+
46
+ Projects may share the workspace environment just installed when their dependencies are compatible, or use a project-local environment when required. Record the chosen interpreter and use its absolute path in shortcuts and run instructions. Target launchers must work when invoked by absolute path from another working directory: resolve paths from `__file__`, make the project's task modules and config importable, and set the working directory to that project's subfolder before starting the runtime. Resolve mutable paths under that same folder so projects do not share settings, logs, or MCP ownership accidentally.
13
47
 
14
48
  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
49
 
@@ -26,7 +60,6 @@ ROOT = Path(__file__).resolve().parent
26
60
  config = {
27
61
  'version': '0.1.0',
28
62
  'gui_title': 'Automation Playground',
29
- 'gui_icon': str(ROOT / 'assets' / 'app.png'),
30
63
  'gui': {'type': 'qt'},
31
64
  'debug': False,
32
65
  'config_folder': str(ROOT / 'configs'),
@@ -49,7 +82,7 @@ config = {
49
82
  }
50
83
  ```
51
84
 
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.
85
+ Adapt this example. 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
86
 
54
87
  If the task needs named template matching, add `template_matching` with
55
88
  `'template_folder': str(ROOT / 'assets' / 'templates')` and the project's matching
@@ -62,8 +95,8 @@ under `ok_templates`, separate from exported crops. Follow
62
95
 
63
96
  - `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.
64
97
  - `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.
65
- - Share path setup and target process startup in a launcher helper. Copy config before applying mode-specific overrides. Clean up the runtime on exit.
66
- - 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.
98
+ - Keep both scripts in the project's subfolder and load that project's `config.py`. Share path setup and target process startup in a project-local launcher helper when useful. Copy config before applying mode-specific overrides. Clean up the runtime on exit.
99
+ - A user `.lnk` targets the absolute venv `pythonw.exe`, passes a quoted absolute `start_gui.py` path, and sets the working directory. Use a custom shortcut icon when one is supplied. A hidden `python.exe` console does not replace `pythonw.exe` for the user shortcut.
67
100
 
68
101
  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.
69
102
 
@@ -73,4 +106,4 @@ Start the development launcher and inspect an MCP screenshot for a complete, cur
73
106
 
74
107
  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.
75
108
 
76
- 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.
109
+ Launch the actual user shortcut: confirm the GUI opens without a console or MCP listener and loads this project's config. When a task was also requested and implemented, confirm it appears with a useful name and its Start action runs successfully; see [develop](../develop/SKILL.md) for task lifecycle and retry behavior. A new project without tasks should still open successfully. Report the project folder, config, selected interpreter, concrete launcher paths, and the interaction/capture behavior that was tested.
@@ -1,6 +1,7 @@
1
1
  recursive-include ok *
2
2
  recursive-include .agents/skills *
3
3
  include docs/mcp.md
4
+ include docs/agent-setup.md
4
5
  include docs/feature-crops.md
5
6
  include examples/mcp_observe.py
6
7
  global-exclude *.pyc
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ok-script
3
- Version: 2.0.16
3
+ Version: 2.0.18
4
4
  Summary: Automation with Computer Vision for Python
5
5
  Author-email: ok-oldking <firedcto@gmail.com>
6
6
  License: ok-script License
@@ -79,6 +79,7 @@ License: ok-script License
79
79
 
80
80
  Project-URL: Homepage, https://github.com/ok-oldking/ok-script
81
81
  Project-URL: Repository, https://github.com/ok-oldking/ok-script
82
+ Project-URL: Agent setup, https://github.com/ok-oldking/ok-script/blob/master/docs/agent-setup.md
82
83
  Classifier: Programming Language :: Python :: 3
83
84
  Classifier: Programming Language :: Python :: 3.11
84
85
  Classifier: Programming Language :: Python :: 3.12
@@ -98,8 +99,7 @@ Requires-Dist: pydirectinput==1.0.4
98
99
  Requires-Dist: pycaw==20240210
99
100
  Requires-Dist: mouse==0.7.1
100
101
  Requires-Dist: pynput>=1.8.1
101
- Provides-Extra: mcp
102
- Requires-Dist: mcp==2.3.0; extra == "mcp"
102
+ Requires-Dist: mcp==2.3.0
103
103
  Provides-Extra: default
104
104
  Requires-Dist: numpy>=1.26.4; extra == "default"
105
105
  Requires-Dist: Pillow>=10.0; extra == "default"
@@ -141,6 +141,14 @@ ok-script 支持 Windows 应用和游戏、安卓模拟器及 ADB 设备,提
141
141
 
142
142
  ## 可以这样告诉编程代理
143
143
 
144
+ 首次安装环境:
145
+
146
+ > 在当前项目中安装 ok-script 并配置运行环境。先读取 https://raw.githubusercontent.com/ok-oldking/ok-script/master/docs/agent-setup.md ,按照其中的安装技能操作,保留项目现有的依赖约束。
147
+
148
+ [代理安装指南(英文)](docs/agent-setup.md)提供可添加到应用项目 `AGENTS.md` 的简短指令,让后续安装请求也能找到这些技能,无需先安装包或启动 MCP。
149
+
150
+ 开发自动化任务:
151
+
144
152
  > 连接这个项目的 ok-script MCP 服务,读取开发技能。检查已安装的截图、匹配和输入 API,给出准确签名和源码位置。开发可复用 Python 任务:打开设置、启用“显示详情”、保存并验证结果。每次尝试前恢复并验证起始界面,测试重复运行,代码保存到项目中。使用 ok-script API 和 MCP,不使用 Computer Use 工具。最后给出不依赖代理或大模型调用的准确运行命令。
145
153
 
146
154
  ## 特性
@@ -159,11 +167,11 @@ ok-script 支持 Windows 应用和游戏、安卓模拟器及 ADB 设备,提
159
167
 
160
168
  ```powershell
161
169
  python -m venv .venv
162
- .\.venv\Scripts\python.exe -m pip install "ok-script[default,mcp]"
170
+ .\.venv\Scripts\python.exe -m pip install "ok-script[default]"
163
171
  .\.venv\Scripts\python.exe -m ok mcp --config src.config:config
164
172
  ```
165
173
 
166
- 启动命令要求应用配置已经存在,请使用实际配置入口或项目已有的开发启动器。已有项目应为原版本添加 MCP 扩展。OpenCV 需单独选择并安装一个兼容变体;Qt、ADB 和 OCR 按需安装。
174
+ 启动命令要求应用配置已经存在,请使用实际配置入口或项目已有的开发启动器。MCP 自 2.0.17 起随 ok-script 自动安装,无需额外扩展。OpenCV 需单独选择并安装一个兼容变体;Qt、ADB 和 OCR 按需安装。
167
175
 
168
176
  让代理的 MCP 客户端连接有效 `logs/mcp/connections/<pid>-<port>.json` 记录中的 URL,并使用该记录的 `Authorization: Bearer <token>` 请求头。不要公开凭据。让代理调用 `list_skills`,通过 `get_skill` 读取相关技能,再用 `screenshot` 验证目标。
169
177
 
@@ -14,6 +14,14 @@ ok-script 支持 Windows 应用和游戏、安卓模拟器及 ADB 设备,提
14
14
 
15
15
  ## 可以这样告诉编程代理
16
16
 
17
+ 首次安装环境:
18
+
19
+ > 在当前项目中安装 ok-script 并配置运行环境。先读取 https://raw.githubusercontent.com/ok-oldking/ok-script/master/docs/agent-setup.md ,按照其中的安装技能操作,保留项目现有的依赖约束。
20
+
21
+ [代理安装指南(英文)](docs/agent-setup.md)提供可添加到应用项目 `AGENTS.md` 的简短指令,让后续安装请求也能找到这些技能,无需先安装包或启动 MCP。
22
+
23
+ 开发自动化任务:
24
+
17
25
  > 连接这个项目的 ok-script MCP 服务,读取开发技能。检查已安装的截图、匹配和输入 API,给出准确签名和源码位置。开发可复用 Python 任务:打开设置、启用“显示详情”、保存并验证结果。每次尝试前恢复并验证起始界面,测试重复运行,代码保存到项目中。使用 ok-script API 和 MCP,不使用 Computer Use 工具。最后给出不依赖代理或大模型调用的准确运行命令。
18
26
 
19
27
  ## 特性
@@ -32,11 +40,11 @@ ok-script 支持 Windows 应用和游戏、安卓模拟器及 ADB 设备,提
32
40
 
33
41
  ```powershell
34
42
  python -m venv .venv
35
- .\.venv\Scripts\python.exe -m pip install "ok-script[default,mcp]"
43
+ .\.venv\Scripts\python.exe -m pip install "ok-script[default]"
36
44
  .\.venv\Scripts\python.exe -m ok mcp --config src.config:config
37
45
  ```
38
46
 
39
- 启动命令要求应用配置已经存在,请使用实际配置入口或项目已有的开发启动器。已有项目应为原版本添加 MCP 扩展。OpenCV 需单独选择并安装一个兼容变体;Qt、ADB 和 OCR 按需安装。
47
+ 启动命令要求应用配置已经存在,请使用实际配置入口或项目已有的开发启动器。MCP 自 2.0.17 起随 ok-script 自动安装,无需额外扩展。OpenCV 需单独选择并安装一个兼容变体;Qt、ADB 和 OCR 按需安装。
40
48
 
41
49
  让代理的 MCP 客户端连接有效 `logs/mcp/connections/<pid>-<port>.json` 记录中的 URL,并使用该记录的 `Authorization: Bearer <token>` 请求头。不要公开凭据。让代理调用 `list_skills`,通过 `get_skill` 读取相关技能,再用 `screenshot` 验证目标。
42
50
 
@@ -0,0 +1,94 @@
1
+ # Set up ok-script with a coding agent
2
+
3
+ Use this entry point when asked to install the `ok-script` Python package, prepare
4
+ its environment, or set up an automation project that uses it. Work in the
5
+ consuming application's folder. The library source does not need to be cloned.
6
+
7
+ ## Give the agent an entry point
8
+
9
+ For a one-time setup, tell your coding agent:
10
+
11
+ > Install ok-script and set up this project's environment. First read https://raw.githubusercontent.com/ok-oldking/ok-script/master/docs/agent-setup.md and follow the relevant setup skills linked there. Preserve this project's existing dependency constraints.
12
+
13
+ For future requests such as "install ok-script and set up its environment", add
14
+ the following to the consuming project's `AGENTS.md`, or the instruction file
15
+ your coding agent reads:
16
+
17
+ ```markdown
18
+ ## ok-script setup
19
+
20
+ When asked to install, configure, or repair ok-script or its Python environment,
21
+ read https://raw.githubusercontent.com/ok-oldking/ok-script/master/docs/agent-setup.md
22
+ and follow the relevant setup skills before changing the environment.
23
+ Use this project's virtual environment and preserve its dependency constraints.
24
+ After installation, offer to create an automation project and ask for missing
25
+ game/app details. Give each project its own subfolder, config, and start scripts.
26
+ ```
27
+
28
+ Installing a Python package does not register its instructions with a coding
29
+ agent. The prompt or project instruction supplies the discovery link; after
30
+ installation, the package also provides local copies of the skills. No MCP
31
+ server is needed to read the setup instructions.
32
+
33
+ ## Instructions for the coding agent
34
+
35
+ 1. Inspect the consuming project's instructions, Python requirements, lockfile,
36
+ existing environment, and requested outcome. This is application setup, not
37
+ development of the ok-script library. For a new environment, ok-script
38
+ currently requires Windows and Python 3.11 or later; check the selected
39
+ release's package metadata for its requirements.
40
+ 2. Read the
41
+ [setup-env skill](https://github.com/ok-oldking/ok-script/blob/master/.agents/skills/setup-env/SKILL.md)
42
+ before installing or repairing dependencies. It covers environment creation,
43
+ optional dependency profiles, the separate OpenCV choice, and verification.
44
+ If reading remotely, resolve that skill's relative links against its location
45
+ in this repository. Preserve existing pins and use instructions from the
46
+ matching release or local package when available.
47
+ 3. Install in the application's environment and record the chosen dependencies
48
+ in its existing dependency manifest or lockfile. Follow its package manager's
49
+ workflow. Select only the profiles the requested application needs; a desktop
50
+ GUI commonly uses `default,qt`, with exactly one compatible OpenCV variant
51
+ installed separately. Verify the environment before offering project creation.
52
+ 4. After a successful initial installation, ask: "Would you like to create an
53
+ automation project now? Which game or app should it automate, and is it a
54
+ Windows app or an Android device/emulator?" If the user already requested a
55
+ project, ask only for missing details. Skip this offer when repairing an
56
+ existing project or when the user has explicitly declined project creation.
57
+ 5. When project creation is requested, read the
58
+ [setup-project skill](https://github.com/ok-oldking/ok-script/blob/master/.agents/skills/setup-project/SKILL.md).
59
+ Identify the actual executable/window or device/app from the user's answers
60
+ and local inspection. Ask for any required details that remain ambiguous;
61
+ wait for those answers before writing target-dependent config. Create each
62
+ project in its own named workspace subfolder, containing its own `config.py`,
63
+ `start_gui.py`, and `start_mcp.py`. Keep its tasks, assets, settings, and logs
64
+ in that folder too. Omit `gui_icon` to use the default `OK` PNG bundled with
65
+ the Python package; set it only when supplying a custom application icon.
66
+ Reuse an existing project in place. Projects may share
67
+ the prepared environment when compatible. Use the installed version's APIs
68
+ and verify that launchers work when invoked from outside their subfolder.
69
+ 6. Run the checks in the relevant skills. Report the environment path, installed
70
+ ok-script version, dependency profiles, OpenCV choice, and verification
71
+ results. For application setup, also report the project folder, config,
72
+ launcher paths, and which target capture/input checks succeeded.
73
+
74
+ ## Read skills from an installed package
75
+
76
+ Use the selected environment's interpreter to obtain skill metadata and absolute
77
+ source paths without starting the GUI or MCP server. This example runs from the
78
+ workspace containing `.venv`; a project subfolder can use that same interpreter
79
+ by its resolved absolute path:
80
+
81
+ ```powershell
82
+ $projectPy = (Resolve-Path .\.venv\Scripts\python.exe).Path
83
+ & $projectPy -c "from ok.core.skills import list_skills; import json; print(json.dumps(list_skills(), indent=2))"
84
+ ```
85
+
86
+ Read the returned `setup-env` or `setup-project` path and resolve relative links
87
+ from that file. These local copies match the installed package. If an older
88
+ release does not include skills, use this repository's instructions and inspect
89
+ the installed APIs rather than upgrading just to obtain instructions.
90
+
91
+ Once a requested MCP runtime is running, `list_skills()` and
92
+ `get_skill("setup-project")` expose the same instructions. See the
93
+ [MCP guide](mcp.md) for connection details and the
94
+ [development prompts](en/agent-prompts.md) for subsequent task implementation.
@@ -14,11 +14,16 @@ MCP supplies skills and task execution, not a Python API catalog or `get_api` to
14
14
 
15
15
  ## Install and start
16
16
 
17
- Install the MCP profile alongside the capture and OCR profiles your project uses.
17
+ If the project has no environment or MCP runtime yet, start with the
18
+ [agent setup guide](agent-setup.md). Its setup skills can be read before
19
+ installation, without connecting to a running server.
20
+
21
+ MCP is a required dependency of ok-script starting in 2.0.17. Install the capture
22
+ and OCR profiles your project needs; no separate MCP extra is required.
18
23
  Use the project's virtual environment when one exists:
19
24
 
20
25
  ```powershell
21
- .\.venv\Scripts\python.exe -m pip install "ok-script[default,mcp]"
26
+ .\.venv\Scripts\python.exe -m pip install "ok-script[default]"
22
27
  .\.venv\Scripts\python.exe -m ok mcp --config src.config:config
23
28
  ```
24
29
 
@@ -45,8 +50,8 @@ account permissions and read or change files. Confirming starts the server
45
50
  immediately; cancelling leaves it off. Turning it off, or resetting Basic
46
51
  Options, stops this instance's server immediately. The confirmed preference is
47
52
  saved for subsequent launches. If enabling from settings fails, the switch stays
48
- disabled and shows the error, including installation instructions if the MCP
49
- profile is missing.
53
+ disabled and shows the error. Repair the project dependencies if the required
54
+ MCP package is missing or incompatible.
50
55
 
51
56
  You can also opt in explicitly from the command line:
52
57
 
@@ -14,7 +14,7 @@ from typing import TYPE_CHECKING
14
14
  from ok.util.handler import Handler, ExitEvent
15
15
  from ok.util.logger import Logger
16
16
  from ok.util.file import get_path_relative_to_exe
17
- from ok.core.ui_config import resolve_ui_config, resolve_window_size
17
+ from ok.core.ui_config import resolve_gui_icon, resolve_ui_config, resolve_window_size
18
18
  os.environ["PYTHONIOENCODING"] = "utf-8"
19
19
 
20
20
  if TYPE_CHECKING:
@@ -333,7 +333,7 @@ class App(_OverlayConfigMixin):
333
333
  self.overlay_window = None
334
334
  self.main_window = None
335
335
  self.exit_event = exit_event
336
- self.icon = QIcon(get_path_relative_to_exe(config.get('gui_icon')) or ":/icon/icon.ico")
336
+ self.icon = QIcon(get_path_relative_to_exe(resolve_gui_icon(config)))
337
337
 
338
338
  from ok.core.start_controller import StartController
339
339
  self.start_controller = StartController(self.config, exit_event)
@@ -654,6 +654,7 @@ class OK:
654
654
  import pyappify
655
655
  from ok.util.config import Config
656
656
 
657
+ config['gui_icon'] = resolve_gui_icon(config)
657
658
  self.config = config
658
659
  check_mutex_fn = _resolve('check_mutex')
659
660
  config_logger_fn = _resolve('config_logger')
@@ -1,4 +1,4 @@
1
- """Optional localhost MCP transport for task development and explicit reloading."""
1
+ """Localhost MCP transport for task development and explicit reloading."""
2
2
 
3
3
  import asyncio
4
4
  import errno
@@ -101,12 +101,12 @@ class _BearerAuth:
101
101
 
102
102
 
103
103
  def create_mcp_app(runner, token, port, request_exit=None):
104
- """Build the task and skill ASGI app, importing the optional SDK only here."""
104
+ """Build the task and skill ASGI app, loading the SDK only when the server is enabled."""
105
105
  try:
106
106
  from mcp.server import MCPServer
107
107
  from mcp.server.transport_security import TransportSecuritySettings
108
108
  except ImportError as error:
109
- raise RuntimeError('Install the MCP profile: pip install "ok-script[mcp]"') from error
109
+ raise RuntimeError("The required MCP dependency is missing or incompatible. Reinstall this project's pinned ok-script dependencies.") from error
110
110
 
111
111
  mcp = MCPServer('ok-script', instructions=(
112
112
  'Call list_skills to discover packaged ok-script instructions, then get_skill '
@@ -1,3 +1,6 @@
1
+ from pathlib import Path
2
+
3
+
1
4
  DEFAULT_WINDOW_SIZE = {
2
5
  "width": 1200,
3
6
  "height": 800,
@@ -8,6 +11,11 @@ DEFAULT_WINDOW_SIZE = {
8
11
  GUI_TYPES = {"qt"}
9
12
 
10
13
 
14
+ def resolve_gui_icon(config):
15
+ """Keep custom icons, otherwise use the PNG shipped with the package."""
16
+ return config.get("gui_icon") or str(Path(__file__).resolve().parents[1] / "assets/default-icon.png")
17
+
18
+
11
19
  def resolve_ui_config(config):
12
20
  """Resolve the nested UI schema, with legacy top-level compatibility."""
13
21
  if "gui" in config:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ok-script
3
- Version: 2.0.16
3
+ Version: 2.0.18
4
4
  Summary: Automation with Computer Vision for Python
5
5
  Author-email: ok-oldking <firedcto@gmail.com>
6
6
  License: ok-script License
@@ -79,6 +79,7 @@ License: ok-script License
79
79
 
80
80
  Project-URL: Homepage, https://github.com/ok-oldking/ok-script
81
81
  Project-URL: Repository, https://github.com/ok-oldking/ok-script
82
+ Project-URL: Agent setup, https://github.com/ok-oldking/ok-script/blob/master/docs/agent-setup.md
82
83
  Classifier: Programming Language :: Python :: 3
83
84
  Classifier: Programming Language :: Python :: 3.11
84
85
  Classifier: Programming Language :: Python :: 3.12
@@ -98,8 +99,7 @@ Requires-Dist: pydirectinput==1.0.4
98
99
  Requires-Dist: pycaw==20240210
99
100
  Requires-Dist: mouse==0.7.1
100
101
  Requires-Dist: pynput>=1.8.1
101
- Provides-Extra: mcp
102
- Requires-Dist: mcp==2.3.0; extra == "mcp"
102
+ Requires-Dist: mcp==2.3.0
103
103
  Provides-Extra: default
104
104
  Requires-Dist: numpy>=1.26.4; extra == "default"
105
105
  Requires-Dist: Pillow>=10.0; extra == "default"
@@ -141,6 +141,14 @@ ok-script 支持 Windows 应用和游戏、安卓模拟器及 ADB 设备,提
141
141
 
142
142
  ## 可以这样告诉编程代理
143
143
 
144
+ 首次安装环境:
145
+
146
+ > 在当前项目中安装 ok-script 并配置运行环境。先读取 https://raw.githubusercontent.com/ok-oldking/ok-script/master/docs/agent-setup.md ,按照其中的安装技能操作,保留项目现有的依赖约束。
147
+
148
+ [代理安装指南(英文)](docs/agent-setup.md)提供可添加到应用项目 `AGENTS.md` 的简短指令,让后续安装请求也能找到这些技能,无需先安装包或启动 MCP。
149
+
150
+ 开发自动化任务:
151
+
144
152
  > 连接这个项目的 ok-script MCP 服务,读取开发技能。检查已安装的截图、匹配和输入 API,给出准确签名和源码位置。开发可复用 Python 任务:打开设置、启用“显示详情”、保存并验证结果。每次尝试前恢复并验证起始界面,测试重复运行,代码保存到项目中。使用 ok-script API 和 MCP,不使用 Computer Use 工具。最后给出不依赖代理或大模型调用的准确运行命令。
145
153
 
146
154
  ## 特性
@@ -159,11 +167,11 @@ ok-script 支持 Windows 应用和游戏、安卓模拟器及 ADB 设备,提
159
167
 
160
168
  ```powershell
161
169
  python -m venv .venv
162
- .\.venv\Scripts\python.exe -m pip install "ok-script[default,mcp]"
170
+ .\.venv\Scripts\python.exe -m pip install "ok-script[default]"
163
171
  .\.venv\Scripts\python.exe -m ok mcp --config src.config:config
164
172
  ```
165
173
 
166
- 启动命令要求应用配置已经存在,请使用实际配置入口或项目已有的开发启动器。已有项目应为原版本添加 MCP 扩展。OpenCV 需单独选择并安装一个兼容变体;Qt、ADB 和 OCR 按需安装。
174
+ 启动命令要求应用配置已经存在,请使用实际配置入口或项目已有的开发启动器。MCP 自 2.0.17 起随 ok-script 自动安装,无需额外扩展。OpenCV 需单独选择并安装一个兼容变体;Qt、ADB 和 OCR 按需安装。
167
175
 
168
176
  让代理的 MCP 客户端连接有效 `logs/mcp/connections/<pid>-<port>.json` 记录中的 URL,并使用该记录的 `Authorization: Bearer <token>` 请求头。不要公开凭据。让代理调用 `list_skills`,通过 `get_skill` 读取相关技能,再用 `screenshot` 验证目标。
169
177
 
@@ -17,6 +17,7 @@ setup.py
17
17
  .agents/skills/write-test/SKILL.md
18
18
  .agents/skills/write-test/agents/openai.yaml
19
19
  diagnostics/qq_trace.py
20
+ docs/agent-setup.md
20
21
  docs/feature-crops.md
21
22
  docs/mcp.md
22
23
  examples/mcp_observe.py
@@ -28,6 +29,7 @@ ok/alas/emulator_base.py
28
29
  ok/alas/emulator_windows.py
29
30
  ok/alas/platform_windows.py
30
31
  ok/alas/utils.py
32
+ ok/assets/default-icon.png
31
33
  ok/capture/__init__.py
32
34
  ok/capture/adb/__init__.py
33
35
  ok/capture/adb/deep.py
@@ -7,6 +7,7 @@ pydirectinput==1.0.4
7
7
  pycaw==20240210
8
8
  mouse==0.7.1
9
9
  pynput>=1.8.1
10
+ mcp==2.3.0
10
11
 
11
12
  [adb]
12
13
  adbutils>=2.2.1
@@ -27,9 +28,6 @@ wheel
27
28
  get-pypi-latest-version
28
29
  mkdocs-material==9.7.7
29
30
 
30
- [mcp]
31
- mcp==2.3.0
32
-
33
31
  [ocr]
34
32
  onnxocr-ppocrv5
35
33
 
@@ -36,12 +36,10 @@ dependencies = [
36
36
  "pycaw==20240210",
37
37
  "mouse==0.7.1",
38
38
  "pynput>=1.8.1",
39
+ "mcp==2.3.0",
39
40
  ]
40
41
 
41
42
  [project.optional-dependencies]
42
- mcp = [
43
- "mcp==2.3.0",
44
- ]
45
43
  default = [
46
44
  "numpy>=1.26.4",
47
45
  "Pillow>=10.0",
@@ -74,14 +72,12 @@ dev = [
74
72
  [project.urls]
75
73
  Homepage = "https://github.com/ok-oldking/ok-script"
76
74
  Repository = "https://github.com/ok-oldking/ok-script"
75
+ "Agent setup" = "https://github.com/ok-oldking/ok-script/blob/master/docs/agent-setup.md"
77
76
 
78
77
  [project.scripts]
79
78
  ok = "ok.cli:main"
80
79
 
81
80
  [dependency-groups]
82
- mcp = [
83
- "mcp==2.3.0",
84
- ]
85
81
  default = [
86
82
  "numpy>=1.26.4",
87
83
  "Pillow>=10.0",
@@ -117,3 +113,6 @@ zip-safe = false
117
113
 
118
114
  [tool.setuptools.packages.find]
119
115
  exclude = ["tests*", "docs*"]
116
+
117
+ [tool.setuptools.package-data]
118
+ ok = ["assets/*.png"]
@@ -22,7 +22,8 @@ class BuildPyWithSkills(build_py):
22
22
  # Retain the repository layout so relative skill links still resolve.
23
23
  shutil.copytree(root / '.agents/skills', destination / '.agents/skills',
24
24
  dirs_exist_ok=True, ignore=shutil.ignore_patterns('__pycache__', '*.pyc'))
25
- for relative in ('docs/mcp.md', 'docs/feature-crops.md', 'examples/mcp_observe.py'):
25
+ for relative in ('docs/mcp.md', 'docs/agent-setup.md', 'docs/feature-crops.md',
26
+ 'examples/mcp_observe.py'):
26
27
  target = destination / relative
27
28
  target.parent.mkdir(parents=True, exist_ok=True)
28
29
  shutil.copyfile(root / relative, target)
@@ -237,11 +237,11 @@ server.join()
237
237
  child.communicate(timeout=10)
238
238
 
239
239
 
240
- def test_missing_optional_sdk_has_install_instructions(monkeypatch):
240
+ def test_missing_required_sdk_has_repair_instructions(monkeypatch):
241
241
  import sys
242
242
  monkeypatch.setitem(sys.modules, 'mcp', None)
243
243
  monkeypatch.setitem(sys.modules, 'mcp.server', None)
244
- with pytest.raises(RuntimeError, match=r'ok-script\[mcp\]'):
244
+ with pytest.raises(RuntimeError, match='required MCP dependency'):
245
245
  create_mcp_app(None, 'test-token', 8765)
246
246
 
247
247
 
@@ -71,14 +71,14 @@ def test_cancel_leaves_server_disabled(setting):
71
71
 
72
72
  def test_failed_start_rolls_back_setting_and_shows_error(setting):
73
73
  s = setting
74
- s.server.return_value.start.side_effect = RuntimeError('Install the MCP profile')
74
+ s.server.return_value.start.side_effect = RuntimeError('The required MCP dependency is missing')
75
75
  s.widget.switch_button.setChecked(True)
76
76
  assert not s.config[ENABLE_MCP_SERVER]
77
77
  assert not s.widget.switch_button.isChecked()
78
78
  assert s.runtime._mcp_server is None
79
79
  assert s.runtime.config['mcp'] == {'port': 0}
80
80
  assert s.dialog.call_count == 2
81
- assert s.dialog.call_args.args[1] == 'Install the MCP profile'
81
+ assert s.dialog.call_args.args[1] == 'The required MCP dependency is missing'
82
82
 
83
83
 
84
84
  @pytest.mark.parametrize('reset', [False, True])
@@ -11,7 +11,7 @@ def test_pyproject_profiles_are_consistent_and_headless_by_default():
11
11
  extras = project["optional-dependencies"]
12
12
  groups = metadata["dependency-groups"]
13
13
 
14
- assert set(extras) == {"default", "qt", "adb", "ocr", "dev", "mcp"}
14
+ assert set(extras) == {"default", "qt", "adb", "ocr", "dev"}
15
15
  assert extras == groups
16
16
  assert extras["adb"] == ["adbutils>=2.2.1"]
17
17
  assert extras["ocr"] == ["onnxocr-ppocrv5"]
@@ -22,6 +22,7 @@ def test_pyproject_profiles_are_consistent_and_headless_by_default():
22
22
  assert any(requirement.startswith("pytest") for requirement in extras["dev"])
23
23
  assert not any(requirement.startswith("pytest") for requirement in project["dependencies"])
24
24
  assert "pynput>=1.8.1" in project["dependencies"]
25
+ assert "mcp==2.3.0" in project["dependencies"]
25
26
  assert not any(requirement.startswith("packaging") for requirement in project["dependencies"])
26
27
 
27
28
  managed_requirements = [
@@ -65,6 +65,7 @@ def test_incremental_build_bundles_only_current_consumer_skills(tmp_path, monkey
65
65
 
66
66
  assert not stale.exists()
67
67
  assert not (destination / 'pyproject.toml').exists()
68
+ assert (destination / 'docs/agent-setup.md').read_bytes() == (root / 'docs/agent-setup.md').read_bytes()
68
69
  monkeypatch.setattr(skills, '__file__', str(Path(command.build_lib) / 'ok/core/skills.py'))
69
70
  catalog = skills.list_skills()
70
71
  assert {skill['id'] for skill in catalog} == CONSUMER_SKILLS