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.
- ok_script-2.0.18/.agents/skills/setup-env/SKILL.md +48 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/setup-project/SKILL.md +40 -7
- {ok_script-2.0.16 → ok_script-2.0.18}/MANIFEST.in +1 -0
- {ok_script-2.0.16/ok_script.egg-info → ok_script-2.0.18}/PKG-INFO +13 -5
- {ok_script-2.0.16 → ok_script-2.0.18}/README.md +10 -2
- ok_script-2.0.18/docs/agent-setup.md +94 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/docs/mcp.md +9 -4
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/__init__.py +3 -2
- ok_script-2.0.18/ok/assets/default-icon.png +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/mcp_server.py +3 -3
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/ui_config.py +8 -0
- {ok_script-2.0.16 → ok_script-2.0.18/ok_script.egg-info}/PKG-INFO +13 -5
- {ok_script-2.0.16 → ok_script-2.0.18}/ok_script.egg-info/SOURCES.txt +2 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok_script.egg-info/requires.txt +1 -3
- {ok_script-2.0.16 → ok_script-2.0.18}/pyproject.toml +5 -6
- {ok_script-2.0.16 → ok_script-2.0.18}/setup.py +2 -1
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_mcp_server.py +2 -2
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_mcp_setting.py +2 -2
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_package_metadata.py +2 -1
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_skills.py +1 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_ui_config.py +19 -1
- ok_script-2.0.16/.agents/skills/setup-env/SKILL.md +0 -36
- {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/develop/SKILL.md +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/develop/agents/openai.yaml +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/develop/references/windows-input.md +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/generate-templates/SKILL.md +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/reload-tasks/SKILL.md +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/reload-tasks/agents/openai.yaml +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/setup-env/agents/openai.yaml +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/setup-project/agents/openai.yaml +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/use_venv/SKILL.md +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/write-test/SKILL.md +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/.agents/skills/write-test/agents/openai.yaml +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/LICENSE.txt +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/diagnostics/qq_trace.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/docs/feature-crops.md +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/examples/mcp_observe.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/__main__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/alas/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/alas/emulator_base.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/alas/emulator_windows.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/alas/platform_windows.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/alas/utils.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/adb/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/adb/deep.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/adb/minitouch.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/adb/nemu_ipc.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/adb/nemu_utils.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/adb/pool.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/adb/timer.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/adb/util.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/windows/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/windows/d3d11.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/capture/windows/dump.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/cli.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/capture_labels.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/code_runner.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/config_schema.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/downloads.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/events.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/icons.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/mcp_runner.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/notifications.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/plugin_staging.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/plugins.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/screenshot.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/script_editing.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/script_packager.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/script_templates.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/skills.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/start_controller.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/task_manager.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/template_store.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/core/translation.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/DeviceManager.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/adb.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/base.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/bitblt.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/bitblt_utils.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/browser.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/desktop_duplication.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/hwnd_window.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/image.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/nemu_ipc.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/types.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/update.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/windows_graphics.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/capture_methods/windows_graphics_hdr.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/adb.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/base.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/browser.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/do_nothing.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/foreground_post_message.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/genshin.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/keys.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/post_message.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/pydirect.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/pynput.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/interaction_methods/swipe.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/device/intercation.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/feature/Box.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/feature/Feature.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/feature/FeatureSet.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/feature/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/gui/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/gui/util/pyappify_startup.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/notification/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/notification/manager.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/notification/messenger_images.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/notification/pipeline.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/notification/ppocr.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/notification/providers.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/notification/system.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/notification/windows_messenger.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ocr/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ocr/download_paddle_model.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Foundation/Collections.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Foundation/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Globalization/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Graphics/Capture/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Graphics/DirectX/Direct3D11/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Graphics/DirectX/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Graphics/Imaging/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Graphics/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Media/Ocr/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Media/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Security/Cryptography/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Security/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Storage/Streams/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/Storage/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/UI/ViewManagement/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/UI/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/Windows/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/delegate.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/export.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/idldsl.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/inspectable.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/roapi.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/types.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/rotypes/winstring.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/task/DiagnosisTask.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/task/TaskExecutor.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/task/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/task/exceptions.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/task/task.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/test/OKTestRunner.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/test/RunTests.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/test/TaskTestCase.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/test/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/third_party/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/third_party/paperclip.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/overlay/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/overlay/win32_gdi.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/Communicate.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/MainWindow.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/MessageWindow.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/StartController.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/TabTitles.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/about/AboutTab.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/about/HttpTextEdit.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/about/LinksBar.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/about/ProjectCard.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/about/UpdateCard.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/about/VersionCard.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/about/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/common/OKIcon.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/common/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/common/accent_color.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/common/config.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/common/design_system.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/common/icons.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/common/style_sheet.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/debug/DebugTab.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/debug/JobControls.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/debug/OverlayWidget.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/debug/RunCodeTab.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/debug/Screenshot.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/debug/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/events.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/GettextTranslator.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/en_US.qm +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/en_US.ts +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/es_ES.qm +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/es_ES.ts +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/ja_JP.qm +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/ja_JP.ts +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/ko_KR.qm +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/ko_KR.ts +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/path.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/update.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/zh_CN.qm +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/zh_CN.ts +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/zh_TW.qm +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/i18n/zh_TW.ts +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/overlay/OverlayWindow.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/overlay/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/plugins/PluginTab.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/plugins/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/plugins/imported_tabs.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/dark/card.qss +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/dark/discord.svg +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/dark/heart.svg +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/dark/message_window.qss +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/dark/setting_interface.qss +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/dark/status_bar.qss +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/dark/stop.svg +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/dark/tab.qss +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/light/card.qss +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/light/discord.svg +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/light/heart.svg +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/light/message_window.qss +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/light/setting_interface.qss +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/light/status_bar.qss +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/light/stop.svg +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qss/light/tab.qss +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/qt.qrc +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/resources.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/settings/GlobalConfigCard.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/settings/GlobalConfigTab.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/settings/SettingTab.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/settings/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/start/LogWindow.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/start/SelectCaptureListView.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/start/SelectInteractionListView.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/start/StartCard.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/start/StartTab.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/start/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/ConfigCard.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/ConfigItemFactory.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/ConfigLabelAndWidget.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/EditTaskTab.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndButtons.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndDoubleSpinBox.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndDropDown.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndFileSelector.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndGlobal.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndLineEdit.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndList.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndMcpServer.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndMultiSelection.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndSpinBox.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndSwitchButton.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndTextEdit.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/LabelAndWidget.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/MarkUpWindow.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/ModifyListDialog.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/ModifyListItem.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/OneTimeTaskTab.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/PythonHighlighter.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/RecordScript.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/ScheduleTaskTab.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/ScriptPackager.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/StartButton.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/TaskCard.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/TaskManger.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/TaskOpButton.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/TaskTab.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/TemplateFactory.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/TemplateTab.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/TooltipTableWidget.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/TriggerTaskTab.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/tasks/schedule_index_sync.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/util/Alert.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/util/InitWorker.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/util/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/util/app.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/util/download.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/util/pip_util.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/util/pyappify_startup.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/util/touch_scroll.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/util/windows_thumbnail.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/BaseLoading.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/BaseWindow.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/Card.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/CustomTab.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/EmptyCard.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/ExpandCardLayout.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/FlowLayout.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/FramelessDialog.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/ImageWidget.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/ImportWarningDialog.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/ListTableWidgetItem.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/NumericTableWidgetItem.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/OkCompactSpinBox.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/SortingTableWidgetItem.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/StartLoadingDialog.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/StatusBar.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/Tab.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/TabWidget.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/UpdateConfigWidgetItem.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/WidgetWithVLabel.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/YesNonWidgetItem.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/ui/qt/widget/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/update/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/update/copy_ok_folder.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/update/inline_ok_requirements.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/Analytics.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/GlobalConfig.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/__init__.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/blur.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/clazz.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/collection.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/color.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/config.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/explorer.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/file.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/gpu_driver_settings.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/handler.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/i18n.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/logger.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/partial_sync_repo.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/print_hwnd.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/process.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/version.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/window.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok/util/windows_schedule.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok_script.egg-info/dependency_links.txt +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok_script.egg-info/entry_points.txt +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok_script.egg-info/not-zip-safe +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/ok_script.egg-info/top_level.txt +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/setup.cfg +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_accent_color.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_app.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_base_interaction.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_blur.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_box.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_capture_update.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_cli.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_config_card.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_core_events.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_core_ui_services.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_debug_job_controls.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_device_manager.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_executor_jobs.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_expand_card_layout.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_explorer.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_global_config.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_gpu_driver_settings.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_handler.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_headless_imports.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_inline_ok_requirements.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_logger.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_main_window_notifications.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_main_window_startup_tab.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_main_window_system_theme.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_mcp_runner.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_missing_frame.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_navigation_state.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_nemu_ipc_capture.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_notifications.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_ok_mutex.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_overlay_custom_draw.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_overlay_lifecycle.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_plugin_staging.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_plugin_tabs.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_plugins.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_process.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_process_mutex.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_pyappify_startup_update.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_qt_events.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_qt_legacy_imports.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_qt_page_layout.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_runtime_startup.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_schedule_startup.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_schedule_task_index_sync.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_screenshot_naming.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_screenshot_rendering.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_start_controller.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_start_tab_overlay.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_task_executor_queue.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_task_reloading.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_task_ui.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_template_compression.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_template_generation.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_template_tab.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_touch_scroll.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_translation_fallback.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_version.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_windows_graphics_capture.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_windows_graphics_hdr.py +0 -0
- {ok_script-2.0.16 → ok_script-2.0.18}/tests/test_windows_schedule_target_parse.py +0 -0
- {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:
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ok-script
|
|
3
|
-
Version: 2.0.
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
49
|
-
|
|
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
|
|
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')
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""
|
|
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,
|
|
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(
|
|
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.
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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/
|
|
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
|
|
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=
|
|
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('
|
|
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] == '
|
|
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"
|
|
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
|