pygpt-net 2.7.4__py3-none-any.whl → 2.7.5__py3-none-any.whl
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.
- pygpt_net/CHANGELOG.txt +7 -0
- pygpt_net/__init__.py +3 -3
- pygpt_net/app_core.py +4 -2
- pygpt_net/controller/__init__.py +5 -1
- pygpt_net/controller/assistant/assistant.py +1 -4
- pygpt_net/controller/assistant/batch.py +5 -504
- pygpt_net/controller/assistant/editor.py +5 -5
- pygpt_net/controller/assistant/files.py +16 -16
- pygpt_net/controller/chat/handler/google_stream.py +307 -1
- pygpt_net/controller/chat/handler/worker.py +8 -1
- pygpt_net/controller/chat/image.py +2 -2
- pygpt_net/controller/dialogs/confirm.py +73 -101
- pygpt_net/controller/lang/mapping.py +9 -9
- pygpt_net/controller/painter/capture.py +50 -1
- pygpt_net/controller/presets/presets.py +2 -1
- pygpt_net/controller/remote_store/__init__.py +12 -0
- pygpt_net/{provider/core/assistant_file/db_sqlite → controller/remote_store/google}/__init__.py +2 -2
- pygpt_net/controller/remote_store/google/batch.py +402 -0
- pygpt_net/controller/remote_store/google/store.py +615 -0
- pygpt_net/controller/remote_store/openai/__init__.py +12 -0
- pygpt_net/controller/remote_store/openai/batch.py +524 -0
- pygpt_net/controller/{assistant → remote_store/openai}/store.py +63 -60
- pygpt_net/controller/remote_store/remote_store.py +35 -0
- pygpt_net/controller/ui/ui.py +20 -1
- pygpt_net/core/assistants/assistants.py +3 -15
- pygpt_net/core/db/database.py +5 -3
- pygpt_net/core/locale/placeholder.py +35 -0
- pygpt_net/core/remote_store/__init__.py +12 -0
- pygpt_net/core/remote_store/google/__init__.py +11 -0
- pygpt_net/core/remote_store/google/files.py +224 -0
- pygpt_net/core/remote_store/google/store.py +248 -0
- pygpt_net/core/remote_store/openai/__init__.py +11 -0
- pygpt_net/core/{assistants → remote_store/openai}/files.py +26 -19
- pygpt_net/core/{assistants → remote_store/openai}/store.py +32 -15
- pygpt_net/core/remote_store/remote_store.py +24 -0
- pygpt_net/data/config/config.json +8 -4
- pygpt_net/data/config/models.json +77 -3
- pygpt_net/data/config/settings.json +45 -0
- pygpt_net/data/locale/locale.de.ini +41 -41
- pygpt_net/data/locale/locale.en.ini +53 -43
- pygpt_net/data/locale/locale.es.ini +41 -41
- pygpt_net/data/locale/locale.fr.ini +41 -41
- pygpt_net/data/locale/locale.it.ini +41 -41
- pygpt_net/data/locale/locale.pl.ini +42 -42
- pygpt_net/data/locale/locale.uk.ini +41 -41
- pygpt_net/data/locale/locale.zh.ini +41 -41
- pygpt_net/data/locale/plugin.cmd_history.de.ini +1 -1
- pygpt_net/data/locale/plugin.cmd_history.en.ini +1 -1
- pygpt_net/data/locale/plugin.cmd_history.es.ini +1 -1
- pygpt_net/data/locale/plugin.cmd_history.fr.ini +1 -1
- pygpt_net/data/locale/plugin.cmd_history.it.ini +1 -1
- pygpt_net/data/locale/plugin.cmd_history.pl.ini +1 -1
- pygpt_net/data/locale/plugin.cmd_history.uk.ini +1 -1
- pygpt_net/data/locale/plugin.cmd_history.zh.ini +1 -1
- pygpt_net/data/locale/plugin.cmd_mouse_control.en.ini +14 -0
- pygpt_net/data/locale/plugin.cmd_web.de.ini +1 -1
- pygpt_net/data/locale/plugin.cmd_web.en.ini +1 -1
- pygpt_net/data/locale/plugin.cmd_web.es.ini +1 -1
- pygpt_net/data/locale/plugin.cmd_web.fr.ini +1 -1
- pygpt_net/data/locale/plugin.cmd_web.it.ini +1 -1
- pygpt_net/data/locale/plugin.cmd_web.pl.ini +1 -1
- pygpt_net/data/locale/plugin.cmd_web.uk.ini +1 -1
- pygpt_net/data/locale/plugin.cmd_web.zh.ini +1 -1
- pygpt_net/data/locale/plugin.idx_llama_index.de.ini +2 -2
- pygpt_net/data/locale/plugin.idx_llama_index.en.ini +2 -2
- pygpt_net/data/locale/plugin.idx_llama_index.es.ini +2 -2
- pygpt_net/data/locale/plugin.idx_llama_index.fr.ini +2 -2
- pygpt_net/data/locale/plugin.idx_llama_index.it.ini +2 -2
- pygpt_net/data/locale/plugin.idx_llama_index.pl.ini +2 -2
- pygpt_net/data/locale/plugin.idx_llama_index.uk.ini +2 -2
- pygpt_net/data/locale/plugin.idx_llama_index.zh.ini +2 -2
- pygpt_net/item/assistant.py +1 -211
- pygpt_net/item/ctx.py +3 -1
- pygpt_net/item/store.py +238 -0
- pygpt_net/migrations/Version20260102190000.py +35 -0
- pygpt_net/migrations/__init__.py +3 -1
- pygpt_net/plugin/cmd_mouse_control/config.py +470 -1
- pygpt_net/plugin/cmd_mouse_control/plugin.py +488 -22
- pygpt_net/plugin/cmd_mouse_control/worker.py +464 -87
- pygpt_net/plugin/cmd_mouse_control/worker_sandbox.py +729 -0
- pygpt_net/plugin/idx_llama_index/config.py +2 -2
- pygpt_net/provider/api/google/__init__.py +16 -54
- pygpt_net/provider/api/google/chat.py +546 -129
- pygpt_net/provider/api/google/computer.py +190 -0
- pygpt_net/provider/api/google/realtime/realtime.py +2 -2
- pygpt_net/provider/api/google/remote_tools.py +93 -0
- pygpt_net/provider/api/google/store.py +546 -0
- pygpt_net/provider/api/google/worker/__init__.py +0 -0
- pygpt_net/provider/api/google/worker/importer.py +392 -0
- pygpt_net/provider/api/openai/computer.py +10 -1
- pygpt_net/provider/api/openai/store.py +6 -6
- pygpt_net/provider/api/openai/worker/importer.py +24 -24
- pygpt_net/provider/core/config/patch.py +16 -1
- pygpt_net/provider/core/config/patches/patch_before_2_6_42.py +3 -3
- pygpt_net/provider/core/model/patch.py +17 -3
- pygpt_net/provider/core/preset/json_file.py +13 -7
- pygpt_net/provider/core/{assistant_file → remote_file}/__init__.py +1 -1
- pygpt_net/provider/core/{assistant_file → remote_file}/base.py +9 -9
- pygpt_net/provider/core/remote_file/db_sqlite/__init__.py +12 -0
- pygpt_net/provider/core/{assistant_file → remote_file}/db_sqlite/patch.py +1 -1
- pygpt_net/provider/core/{assistant_file → remote_file}/db_sqlite/provider.py +23 -20
- pygpt_net/provider/core/{assistant_file → remote_file}/db_sqlite/storage.py +35 -27
- pygpt_net/provider/core/{assistant_file → remote_file}/db_sqlite/utils.py +5 -4
- pygpt_net/provider/core/{assistant_store → remote_store}/__init__.py +1 -1
- pygpt_net/provider/core/{assistant_store → remote_store}/base.py +10 -10
- pygpt_net/provider/core/{assistant_store → remote_store}/db_sqlite/__init__.py +1 -1
- pygpt_net/provider/core/{assistant_store → remote_store}/db_sqlite/patch.py +1 -1
- pygpt_net/provider/core/{assistant_store → remote_store}/db_sqlite/provider.py +16 -15
- pygpt_net/provider/core/{assistant_store → remote_store}/db_sqlite/storage.py +30 -23
- pygpt_net/provider/core/{assistant_store → remote_store}/db_sqlite/utils.py +5 -4
- pygpt_net/provider/core/{assistant_store → remote_store}/json_file.py +9 -9
- pygpt_net/provider/llms/google.py +2 -2
- pygpt_net/ui/base/config_dialog.py +3 -2
- pygpt_net/ui/dialog/assistant.py +3 -3
- pygpt_net/ui/dialog/plugins.py +3 -1
- pygpt_net/ui/dialog/remote_store_google.py +539 -0
- pygpt_net/ui/dialog/{assistant_store.py → remote_store_openai.py} +95 -95
- pygpt_net/ui/dialogs.py +5 -3
- pygpt_net/ui/layout/chat/attachments_uploaded.py +3 -3
- pygpt_net/ui/layout/toolbox/computer_env.py +26 -8
- pygpt_net/ui/menu/tools.py +13 -5
- pygpt_net/ui/widget/dialog/remote_store_google.py +56 -0
- pygpt_net/ui/widget/dialog/{assistant_store.py → remote_store_openai.py} +9 -9
- pygpt_net/ui/widget/element/button.py +4 -4
- pygpt_net/ui/widget/lists/remote_store_google.py +248 -0
- pygpt_net/ui/widget/lists/{assistant_store.py → remote_store_openai.py} +21 -21
- pygpt_net/ui/widget/option/checkbox_list.py +47 -9
- pygpt_net/ui/widget/option/combo.py +39 -3
- {pygpt_net-2.7.4.dist-info → pygpt_net-2.7.5.dist-info}/METADATA +33 -2
- {pygpt_net-2.7.4.dist-info → pygpt_net-2.7.5.dist-info}/RECORD +133 -108
- {pygpt_net-2.7.4.dist-info → pygpt_net-2.7.5.dist-info}/LICENSE +0 -0
- {pygpt_net-2.7.4.dist-info → pygpt_net-2.7.5.dist-info}/WHEEL +0 -0
- {pygpt_net-2.7.4.dist-info → pygpt_net-2.7.5.dist-info}/entry_points.txt +0 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
# GitHub: https://github.com/szczyglis-dev/py-gpt #
|
|
7
7
|
# MIT License #
|
|
8
8
|
# Created By : Marcin Szczygliński #
|
|
9
|
-
# Updated Date:
|
|
9
|
+
# Updated Date: 2026.01.02 02:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
11
|
|
|
12
12
|
from pygpt_net.plugin.base.config import BaseConfig, BasePlugin
|
|
@@ -131,6 +131,63 @@ class Config(BaseConfig):
|
|
|
131
131
|
tooltip="Prompt used to instruct how to control the mouse and keyboard",
|
|
132
132
|
)
|
|
133
133
|
|
|
134
|
+
# Playwright sandbox options
|
|
135
|
+
plugin.add_option(
|
|
136
|
+
"sandbox_path",
|
|
137
|
+
type="text",
|
|
138
|
+
value="",
|
|
139
|
+
label="Sandbox: Playwright browsers path",
|
|
140
|
+
description="Path to Playwright browsers installation - leave empty to use default",
|
|
141
|
+
tab="Sandbox (Playwright)"
|
|
142
|
+
)
|
|
143
|
+
plugin.add_option(
|
|
144
|
+
"sandbox_engine",
|
|
145
|
+
type="text",
|
|
146
|
+
value="chromium",
|
|
147
|
+
label="Sandbox: Playwright engine (chromium|firefox|webkit)",
|
|
148
|
+
description="Playwright browser engine to use (chromium, firefox, webkit) - must be installed",
|
|
149
|
+
tab="Sandbox (Playwright)"
|
|
150
|
+
)
|
|
151
|
+
plugin.add_option(
|
|
152
|
+
"sandbox_headless",
|
|
153
|
+
type="bool",
|
|
154
|
+
value=False,
|
|
155
|
+
label="Sandbox: headless mode",
|
|
156
|
+
description="Run Playwright browser in headless mode (default: False)",
|
|
157
|
+
tab="Sandbox (Playwright)"
|
|
158
|
+
)
|
|
159
|
+
plugin.add_option(
|
|
160
|
+
"sandbox_args",
|
|
161
|
+
type="textarea",
|
|
162
|
+
value="--disable-extensions,\n--disable-file-system",
|
|
163
|
+
label="Sandbox: Playwright browsers args",
|
|
164
|
+
description="Additional Playwright browser arguments (comma-separated)",
|
|
165
|
+
)
|
|
166
|
+
plugin.add_option(
|
|
167
|
+
"sandbox_home",
|
|
168
|
+
type="text",
|
|
169
|
+
value="https://duckduckgo.com",
|
|
170
|
+
label="Sandbox: home URL",
|
|
171
|
+
description="Playwright browser home URL",
|
|
172
|
+
tab="Sandbox (Playwright)"
|
|
173
|
+
)
|
|
174
|
+
plugin.add_option(
|
|
175
|
+
"sandbox_viewport_w",
|
|
176
|
+
type="int",
|
|
177
|
+
value=1440,
|
|
178
|
+
label="Sandbox: viewport width",
|
|
179
|
+
description="Playwright viewport width in pixels",
|
|
180
|
+
tab="Sandbox (Playwright)"
|
|
181
|
+
)
|
|
182
|
+
plugin.add_option(
|
|
183
|
+
"sandbox_viewport_h",
|
|
184
|
+
type="int",
|
|
185
|
+
value=900,
|
|
186
|
+
label="Sandbox: viewport height",
|
|
187
|
+
description="Playwright viewport height in pixels",
|
|
188
|
+
tab="Sandbox (Playwright)"
|
|
189
|
+
)
|
|
190
|
+
|
|
134
191
|
# commands
|
|
135
192
|
plugin.add_cmd(
|
|
136
193
|
"get_mouse_position",
|
|
@@ -153,6 +210,13 @@ class Config(BaseConfig):
|
|
|
153
210
|
enabled=True,
|
|
154
211
|
description="Enable: make screenshot",
|
|
155
212
|
)
|
|
213
|
+
plugin.add_cmd(
|
|
214
|
+
"open_web_browser",
|
|
215
|
+
instruction="open web browser",
|
|
216
|
+
params=[],
|
|
217
|
+
enabled=True,
|
|
218
|
+
description="Enable: open web browser",
|
|
219
|
+
)
|
|
156
220
|
plugin.add_cmd(
|
|
157
221
|
"mouse_move",
|
|
158
222
|
instruction="move mouse cursor to position (x, y)",
|
|
@@ -357,4 +421,409 @@ class Config(BaseConfig):
|
|
|
357
421
|
params=[],
|
|
358
422
|
enabled=True,
|
|
359
423
|
description="Enable: Wait for a moment",
|
|
424
|
+
)
|
|
425
|
+
|
|
426
|
+
# --------------------------------------------------------------------- #
|
|
427
|
+
# Google based additional commands
|
|
428
|
+
# --------------------------------------------------------------------- #
|
|
429
|
+
|
|
430
|
+
plugin.add_cmd(
|
|
431
|
+
"wait_5_seconds",
|
|
432
|
+
instruction="wait for 5 seconds",
|
|
433
|
+
params=[],
|
|
434
|
+
enabled=True,
|
|
435
|
+
description="Enable: Wait 5 seconds",
|
|
436
|
+
)
|
|
437
|
+
plugin.add_cmd(
|
|
438
|
+
"go_back",
|
|
439
|
+
instruction="go back in browser history",
|
|
440
|
+
params=[],
|
|
441
|
+
enabled=True,
|
|
442
|
+
description="Enable: Browser back",
|
|
443
|
+
)
|
|
444
|
+
plugin.add_cmd(
|
|
445
|
+
"go_forward",
|
|
446
|
+
instruction="go forward in browser history",
|
|
447
|
+
params=[],
|
|
448
|
+
enabled=True,
|
|
449
|
+
description="Enable: Browser forward",
|
|
450
|
+
)
|
|
451
|
+
plugin.add_cmd(
|
|
452
|
+
"search",
|
|
453
|
+
instruction="open the default search engine homepage",
|
|
454
|
+
params=[],
|
|
455
|
+
enabled=True,
|
|
456
|
+
description="Enable: Open default search engine",
|
|
457
|
+
)
|
|
458
|
+
plugin.add_cmd(
|
|
459
|
+
"navigate",
|
|
460
|
+
instruction="navigate to a specific URL",
|
|
461
|
+
params=[
|
|
462
|
+
{
|
|
463
|
+
"name": "url",
|
|
464
|
+
"type": "str",
|
|
465
|
+
"description": "destination URL",
|
|
466
|
+
"required": True,
|
|
467
|
+
},
|
|
468
|
+
],
|
|
469
|
+
enabled=True,
|
|
470
|
+
description="Enable: Navigate to URL",
|
|
471
|
+
)
|
|
472
|
+
plugin.add_cmd(
|
|
473
|
+
"click_at",
|
|
474
|
+
instruction="click at normalized coordinates (0..999)",
|
|
475
|
+
params=[
|
|
476
|
+
{
|
|
477
|
+
"name": "x",
|
|
478
|
+
"type": "int",
|
|
479
|
+
"description": "normalized X (0..999)",
|
|
480
|
+
"required": True,
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"name": "y",
|
|
484
|
+
"type": "int",
|
|
485
|
+
"description": "normalized Y (0..999)",
|
|
486
|
+
"required": True,
|
|
487
|
+
},
|
|
488
|
+
],
|
|
489
|
+
enabled=True,
|
|
490
|
+
description="Enable: Click at normalized coordinates",
|
|
491
|
+
)
|
|
492
|
+
plugin.add_cmd(
|
|
493
|
+
"hover_at",
|
|
494
|
+
instruction="move cursor to normalized coordinates (0..999) without clicking",
|
|
495
|
+
params=[
|
|
496
|
+
{
|
|
497
|
+
"name": "x",
|
|
498
|
+
"type": "int",
|
|
499
|
+
"description": "normalized X (0..999)",
|
|
500
|
+
"required": True,
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"name": "y",
|
|
504
|
+
"type": "int",
|
|
505
|
+
"description": "normalized Y (0..999)",
|
|
506
|
+
"required": True,
|
|
507
|
+
},
|
|
508
|
+
],
|
|
509
|
+
enabled=True,
|
|
510
|
+
description="Enable: Hover at normalized coordinates",
|
|
511
|
+
)
|
|
512
|
+
plugin.add_cmd(
|
|
513
|
+
"type_text_at",
|
|
514
|
+
instruction="focus at normalized coordinates and type text; optionally press Enter and/or clear field first",
|
|
515
|
+
params=[
|
|
516
|
+
{
|
|
517
|
+
"name": "x",
|
|
518
|
+
"type": "int",
|
|
519
|
+
"description": "normalized X (0..999)",
|
|
520
|
+
"required": True,
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"name": "y",
|
|
524
|
+
"type": "int",
|
|
525
|
+
"description": "normalized Y (0..999)",
|
|
526
|
+
"required": True,
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"name": "text",
|
|
530
|
+
"type": "str",
|
|
531
|
+
"description": "text to type",
|
|
532
|
+
"required": True,
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
"name": "press_enter",
|
|
536
|
+
"type": "bool",
|
|
537
|
+
"description": "press Enter after typing (default: true)",
|
|
538
|
+
"required": False,
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"name": "clear_before_typing",
|
|
542
|
+
"type": "bool",
|
|
543
|
+
"description": "clear input before typing (default: true)",
|
|
544
|
+
"required": False,
|
|
545
|
+
},
|
|
546
|
+
],
|
|
547
|
+
enabled=True,
|
|
548
|
+
description="Enable: Type text at normalized coordinates",
|
|
549
|
+
)
|
|
550
|
+
plugin.add_cmd(
|
|
551
|
+
"key_combination",
|
|
552
|
+
instruction="press a key combination (e.g., control+shift+tab)",
|
|
553
|
+
params=[
|
|
554
|
+
{
|
|
555
|
+
"name": "keys",
|
|
556
|
+
"type": "list",
|
|
557
|
+
"description": "list of keys to press in a combination or sequence",
|
|
558
|
+
"required": True,
|
|
559
|
+
},
|
|
560
|
+
],
|
|
561
|
+
enabled=True,
|
|
562
|
+
description="Enable: Press key combination",
|
|
563
|
+
)
|
|
564
|
+
plugin.add_cmd(
|
|
565
|
+
"scroll_document",
|
|
566
|
+
instruction="scroll the document in a direction by a magnitude in pixels",
|
|
567
|
+
params=[
|
|
568
|
+
{
|
|
569
|
+
"name": "direction",
|
|
570
|
+
"type": "str",
|
|
571
|
+
"description": "scroll direction, enum: up|down|left|right",
|
|
572
|
+
"required": False,
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"name": "magnitude",
|
|
576
|
+
"type": "int",
|
|
577
|
+
"description": "pixels to scroll (default around 800)",
|
|
578
|
+
"required": False,
|
|
579
|
+
},
|
|
580
|
+
],
|
|
581
|
+
enabled=True,
|
|
582
|
+
description="Enable: Scroll document",
|
|
583
|
+
)
|
|
584
|
+
plugin.add_cmd(
|
|
585
|
+
"scroll_at",
|
|
586
|
+
instruction="scroll at normalized coordinates (0..999) in a direction by a magnitude in pixels",
|
|
587
|
+
params=[
|
|
588
|
+
{
|
|
589
|
+
"name": "x",
|
|
590
|
+
"type": "int",
|
|
591
|
+
"description": "normalized X (0..999)",
|
|
592
|
+
"required": False,
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"name": "y",
|
|
596
|
+
"type": "int",
|
|
597
|
+
"description": "normalized Y (0..999)",
|
|
598
|
+
"required": False,
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"name": "direction",
|
|
602
|
+
"type": "str",
|
|
603
|
+
"description": "scroll direction, enum: up|down|left|right",
|
|
604
|
+
"required": False,
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"name": "magnitude",
|
|
608
|
+
"type": "int",
|
|
609
|
+
"description": "pixels to scroll (default around 800)",
|
|
610
|
+
"required": False,
|
|
611
|
+
},
|
|
612
|
+
],
|
|
613
|
+
enabled=True,
|
|
614
|
+
description="Enable: Scroll at normalized coordinates",
|
|
615
|
+
)
|
|
616
|
+
plugin.add_cmd(
|
|
617
|
+
"drag_and_drop",
|
|
618
|
+
instruction="drag from normalized (x,y) to (destination_x,destination_y)",
|
|
619
|
+
params=[
|
|
620
|
+
{
|
|
621
|
+
"name": "x",
|
|
622
|
+
"type": "int",
|
|
623
|
+
"description": "normalized start X (0..999)",
|
|
624
|
+
"required": True,
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
"name": "y",
|
|
628
|
+
"type": "int",
|
|
629
|
+
"description": "normalized start Y (0..999)",
|
|
630
|
+
"required": True,
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
"name": "destination_x",
|
|
634
|
+
"type": "int",
|
|
635
|
+
"description": "normalized destination X (0..999)",
|
|
636
|
+
"required": True,
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
"name": "destination_y",
|
|
640
|
+
"type": "int",
|
|
641
|
+
"description": "normalized destination Y (0..999)",
|
|
642
|
+
"required": True,
|
|
643
|
+
},
|
|
644
|
+
],
|
|
645
|
+
enabled=True,
|
|
646
|
+
description="Enable: Drag and drop using normalized coordinates",
|
|
647
|
+
)
|
|
648
|
+
plugin.add_cmd(
|
|
649
|
+
"click",
|
|
650
|
+
instruction="click at optional coordinates; if provided as normalized (0..999) they will be converted",
|
|
651
|
+
params=[
|
|
652
|
+
{
|
|
653
|
+
"name": "x",
|
|
654
|
+
"type": "int",
|
|
655
|
+
"description": "X coordinate (pixel or normalized 0..999)",
|
|
656
|
+
"required": False,
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"name": "y",
|
|
660
|
+
"type": "int",
|
|
661
|
+
"description": "Y coordinate (pixel or normalized 0..999)",
|
|
662
|
+
"required": False,
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
"name": "button",
|
|
666
|
+
"type": "str",
|
|
667
|
+
"description": "mouse button, enum: left|middle|right",
|
|
668
|
+
"required": False,
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
"name": "num_clicks",
|
|
672
|
+
"type": "int",
|
|
673
|
+
"description": "number of clicks, default 1",
|
|
674
|
+
"required": False,
|
|
675
|
+
},
|
|
676
|
+
],
|
|
677
|
+
enabled=True,
|
|
678
|
+
description="Enable: Generic click",
|
|
679
|
+
)
|
|
680
|
+
plugin.add_cmd(
|
|
681
|
+
"double_click",
|
|
682
|
+
instruction="double-click at optional coordinates; if provided as normalized (0..999) they will be converted",
|
|
683
|
+
params=[
|
|
684
|
+
{
|
|
685
|
+
"name": "x",
|
|
686
|
+
"type": "int",
|
|
687
|
+
"description": "X coordinate (pixel or normalized 0..999)",
|
|
688
|
+
"required": False,
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
"name": "y",
|
|
692
|
+
"type": "int",
|
|
693
|
+
"description": "Y coordinate (pixel or normalized 0..999)",
|
|
694
|
+
"required": False,
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
"name": "button",
|
|
698
|
+
"type": "str",
|
|
699
|
+
"description": "mouse button, enum: left|middle|right",
|
|
700
|
+
"required": False,
|
|
701
|
+
},
|
|
702
|
+
],
|
|
703
|
+
enabled=True,
|
|
704
|
+
description="Enable: Generic double click",
|
|
705
|
+
)
|
|
706
|
+
plugin.add_cmd(
|
|
707
|
+
"move",
|
|
708
|
+
instruction="move pointer to the given coordinates; normalized (0..999) will be converted",
|
|
709
|
+
params=[
|
|
710
|
+
{
|
|
711
|
+
"name": "x",
|
|
712
|
+
"type": "int",
|
|
713
|
+
"description": "X coordinate (pixel or normalized 0..999)",
|
|
714
|
+
"required": True,
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
"name": "y",
|
|
718
|
+
"type": "int",
|
|
719
|
+
"description": "Y coordinate (pixel or normalized 0..999)",
|
|
720
|
+
"required": True,
|
|
721
|
+
},
|
|
722
|
+
],
|
|
723
|
+
enabled=True,
|
|
724
|
+
description="Enable: Generic move",
|
|
725
|
+
)
|
|
726
|
+
plugin.add_cmd(
|
|
727
|
+
"type",
|
|
728
|
+
instruction="type literal text into the focused element",
|
|
729
|
+
params=[
|
|
730
|
+
{
|
|
731
|
+
"name": "text",
|
|
732
|
+
"type": "str",
|
|
733
|
+
"description": "text to type",
|
|
734
|
+
"required": True,
|
|
735
|
+
},
|
|
736
|
+
],
|
|
737
|
+
enabled=True,
|
|
738
|
+
description="Enable: Generic type text",
|
|
739
|
+
)
|
|
740
|
+
plugin.add_cmd(
|
|
741
|
+
"keypress",
|
|
742
|
+
instruction="press a sequence of keys",
|
|
743
|
+
params=[
|
|
744
|
+
{
|
|
745
|
+
"name": "keys",
|
|
746
|
+
"type": "list",
|
|
747
|
+
"description": "list of keys to press sequentially",
|
|
748
|
+
"required": True,
|
|
749
|
+
},
|
|
750
|
+
],
|
|
751
|
+
enabled=True,
|
|
752
|
+
description="Enable: Generic keypress sequence",
|
|
753
|
+
)
|
|
754
|
+
plugin.add_cmd(
|
|
755
|
+
"scroll",
|
|
756
|
+
instruction="scroll by dx, dy in pixels at an optional (x,y) position",
|
|
757
|
+
params=[
|
|
758
|
+
{
|
|
759
|
+
"name": "x",
|
|
760
|
+
"type": "int",
|
|
761
|
+
"description": "X position to move before scrolling (pixel or normalized 0..999)",
|
|
762
|
+
"required": False,
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
"name": "y",
|
|
766
|
+
"type": "int",
|
|
767
|
+
"description": "Y position to move before scrolling (pixel or normalized 0..999)",
|
|
768
|
+
"required": False,
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
"name": "dx",
|
|
772
|
+
"type": "int",
|
|
773
|
+
"description": "horizontal delta in pixels (positive right, negative left)",
|
|
774
|
+
"required": True,
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
"name": "dy",
|
|
778
|
+
"type": "int",
|
|
779
|
+
"description": "vertical delta in pixels (positive down, negative up)",
|
|
780
|
+
"required": True,
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
"name": "unit",
|
|
784
|
+
"type": "str",
|
|
785
|
+
"description": "unit of scroll value, enum: px|step",
|
|
786
|
+
"required": False,
|
|
787
|
+
},
|
|
788
|
+
],
|
|
789
|
+
enabled=True,
|
|
790
|
+
description="Enable: Generic scroll",
|
|
791
|
+
)
|
|
792
|
+
plugin.add_cmd(
|
|
793
|
+
"drag",
|
|
794
|
+
instruction="drag pointer along a path or from (x,y) to (dx,dy). Normalized coordinates (0..999) are supported.",
|
|
795
|
+
params=[
|
|
796
|
+
{
|
|
797
|
+
"name": "path",
|
|
798
|
+
"type": "list",
|
|
799
|
+
"description": "list of points with fields x,y (at least 2 points)",
|
|
800
|
+
"required": False,
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
"name": "x",
|
|
804
|
+
"type": "int",
|
|
805
|
+
"description": "start X (pixel or normalized 0..999)",
|
|
806
|
+
"required": False,
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
"name": "y",
|
|
810
|
+
"type": "int",
|
|
811
|
+
"description": "start Y (pixel or normalized 0..999)",
|
|
812
|
+
"required": False,
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
"name": "dx",
|
|
816
|
+
"type": "int",
|
|
817
|
+
"description": "destination X (pixel or normalized 0..999)",
|
|
818
|
+
"required": False,
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
"name": "dy",
|
|
822
|
+
"type": "int",
|
|
823
|
+
"description": "destination Y (pixel or normalized 0..999)",
|
|
824
|
+
"required": False,
|
|
825
|
+
},
|
|
826
|
+
],
|
|
827
|
+
enabled=True,
|
|
828
|
+
description="Enable: Generic drag",
|
|
360
829
|
)
|